-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathideas.txt
64 lines (47 loc) · 1.09 KB
/
ideas.txt
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
one page to be completely "dark"
css
.darkness {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
pointer-events: none;
z-index: 1;
}
.light {
position: absolute;
width: 300px;
height: 300px;
border-radius: 100%;
box-shadow: 0 0 0 400vw rgba(0,0,0,0.99);
}
.shadow {
display: block;
width: 100%;
height: 100%;
border-radius: 100%;
box-shadow: inset 0 0 50px 50px rgba(0,0,0,0.5);
}
js
const light = document.getElementById('light');
function update(e) {
var x = (e.clientX - 150) || (e.touches[0].clientX - 150);
var y = (e.clientY - 150) || (e.touches[0].clientY - 150);
light.style.left = x + "px";
light.style.top = y + "px";
}
document.addEventListener('mousemove', update);
document.addEventListener('touchmove', update);
html
<div class="darkness" id="darkness">
<div class="light" id="light">
<div class="shadow"></div>
</div>
</div>
reminder:
make a thank you to "the unknown visitor"
username
array.prototype.filter.
slogan idea
we code perfection