-
Notifications
You must be signed in to change notification settings - Fork 0
/
css2
68 lines (63 loc) · 1.98 KB
/
css2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<p>
<script>
// Create the element
var transparentDiv = document.createElement('div');
// Assign an ID to the element
transparentDiv.id = 'myTransparentDiv';
// Apply CSS styles
transparentDiv.style.position = 'fixed';
transparentDiv.style.top = '0';
transparentDiv.style.left = '0';
transparentDiv.style.width = '100vw';
transparentDiv.style.height = '100vh';
transparentDiv.style.backgroundColor =
'rgba(0, 0, 0, 0)'; // Completely transparent
transparentDiv.style.zIndex = '-1000';
transparentDiv.style.pointerEvents = 'none'; // Allow clicks to pass through
// Append the element to the body
document.body.appendChild(transparentDiv);
</script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r134/three.min.js">
</script>
<script
src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.birds.min.js">
</script>
<script>
VANTA.BIRDS({
el: "#myTransparentDiv",
mouseControls: true,
touchControls: true,
gyroControls: false,
minHeight: 200.00,
minWidth: 200.00,
scale: 1.00,
scaleMobile: 1.00,
birdSize: 0.90,
wingSpan: 12.00,
speedLimit: 2.00,
separation: 75.00,
alignment: 100.00,
cohesion: 100.00,
quantity: 3.00,
backgroundAlpha: 0.00
})
</script>
<script>
document.addEventListener('DOMContentLoaded', function() {
// Select all elements
var allElements = document.querySelectorAll('*');
allElements.forEach(function(el) {
// Get computed style of the element
var style = window.getComputedStyle(el);
// Check if background-image is set and not 'none'
if (!style.backgroundImage || style.backgroundImage ===
'none') {
// Set background to transparent
el.style.background = 'transparent !important';
}
});
});
</script>
</p>
<p> </p>