-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
85 lines (85 loc) · 1.57 KB
/
style.css
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
* {
margin: 0px;
padding: 0px;
box-sizing: border-box;
}
body {
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
gap: 4px;
min-height: 100vh;
background: #222;
overflow: hidden;
}
:root {
--clr1: lightblue;
--clr2: rgb(243, 80, 21);
}
label {
position: relative;
width: 150px;
height: 150px;
margin: 4px;
}
label input {
appearance: none;
}
label .face {
position: absolute;
inset: 0;
background: #333;
cursor: pointer;
border-radius: 50%;
mix-blend-mode: lighten;
transition: 0.5s;
}
label input:checked ~ .face{
background: var(--clr1);
z-index: 100;
filter:
drop-shadow(0 0 4px var(--clr1))
drop-shadow(0 0 16px var(--clr1))
/* drop-shadow(0 0 250px var(--clr1)); */
}
label:nth-child(even) input:checked ~ .face{
background: var(--clr2);
filter:
drop-shadow(0 0 4px var(--clr2))
drop-shadow(0 0 16px var(--clr2))
/* drop-shadow(0 0 250px var(--clr2)); */
}
label .face::before {
content: '';
position: absolute;
top: 60px;
left: 45px;
width: 15px;
height: 15px;
background: #111;
opacity: 0.5;
border-radius: 50%;
box-shadow: 45px 0 0 #111;
}
label .face::after {
content: '';
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 45px;
width: 40px;
height: 8px;
background: #111;
opacity: 0.5;
border-radius: 8px;
transition: 0.5s;
}
label input:checked ~ .face::after{
width: 40px;
height: 20px;
border-radius: 0;
border-bottom-right-radius: 18px;
border-bottom-left-radius: 18px;
transform: translateX(-50%) translateY(10px);
}