-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
105 lines (95 loc) · 1.93 KB
/
test.html
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<!DOCTYPE html>
<html>
<head>
<title></title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<style>
body,
html {
padding: 0;
margin: 0;
background-color:rgba(0,0,0,1.00);
color:rgba(255,255,255,1.00);
overflow: hidden;
}
body * {
z-index: 20;
color: rgba(0,0,0,1.00);
}
#content {
width: 100%;
height: 100vh;
}
#light {
position: absolute;
width: 500px;
height: 500px;
box-shadow: inset 0 0 150px 150px #000;
background: #fff;
z-index: 10;
}
.light-off {
box-shadow: inset 0 0 150px 250px #000 !important;
}
.pogi {
position: absolute;
top: 40%;
left: 45%;
color: yellow;
}
.pogi2 {
position: absolute;
top: 30%;
left: 30%;
}
.pogi3 {
position: absolute;
top: 10%;
left: 20%;
}
</style>
<script type="text/javascript">
//this is a sample flashlight effect
$(document).ready(function() {
$(this).mousemove(function(e) {
$("#light").css({
"top": e.pageY - 250,
"left": e.pageX - 250
})
}).mousedown(function(e) {
switch (e.which) {
case 1:
$("#light").toggleClass("light-off");
break;
case 2:
console.log('Middle Mouse button pressed.');
break;
case 3:
console.log('Right Mouse button pressed.');
break;
default:
console.log('You have a strange Mouse!');
}
})
})
//idea
//when the ball is in the light box, turn it color original.
//if it's out of the box, change the color to black.
//to hide the blocks which are upside, make a black big board and cover them.
</script>
</head>
<body>
<div id="light"></div>
<div id="content">
<div class="pogi">
<h1>POGI AKO</h1>
</div>
<div class="pogi2">
<h1>tTTT</h1>
</div>
<div class="pogi3">
<h1>tTTT</h1>
</div>
</div>
</body>
</html>