-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex8.html
57 lines (56 loc) · 1.32 KB
/
index8.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
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<style type="text/css">
body {
height: 100vh;
margin: 0;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
font-family: sans-serif;
font-size: 16px;
background: hsl(200, 100%, 85%);
}
.wrapper {
text-align: center;
position: relative;
}
.hand {
position: absolute;
line-height: 1;
pointer-events: none;
font-size: calc(2em + 8vw);
transition: transform .25s ease;
top: 0;
left: 50%;
margin-left: -.35em;
transform-origin: 36% 0%;
transform: rotate(180deg) translateY(70vh);
}
input:checked ~ .hand {
transform: rotate(180deg);
}
input {
transform: scale(2);
transform-origin: 50% 100%;
}
</style>
</head>
<body>
<div class="wrapper">
<input type="checkbox" id="useless"><br>
<label for="useless">Check Me</label>
<div class="hand" id="hand">👆</div>
</div>
<script>
console.clear();
document.getElementById("hand").addEventListener("transitionend", function(){
if (document.getElementById("useless").checked == true) {
document.getElementById("useless").checked = false;
}
});
</script>
</body>
</html>