-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
86 lines (74 loc) · 1.56 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
86
@import url('https://fonts.googleapis.com/css?family=Poppins:400,500,600,700&display=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.center {
position: absolute;
top: 45%;
left: 50%;
transform: translate(-50%, -50%);
}
/* .center .stars */
.stars {
height: 150px;
width: 500px;
text-align: center;
}
.stars input {
display: none;
}
.stars label {
float: right;
font-size: 100px;
color: lightgrey;
margin: 0 5px;
text-shadow: 1px 1px #bbb;
}
.stars label::before {
content: '★';
}
.stars input:checked ~ label {
color: gold;
text-shadow: 1px 1px #c60;
}
.stars:not(:checked) > label:hover,
.stars:not(:checked) > label:hover ~ label{
color: gold;
}
.stars input:checked > label:hover,
.stars input:checked > label:hover ~ label{
color: gold;
text-shadow: 1px 1px goldenrod;
}
.result::before {
content: '';
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: -30px;
font-size: 30px;
font-weight: 500;
font-family: 'Poppins', sans-serif;
color: gold;
display: none;
}
.stars input:checked ~ .result::before {
display: block;
}
.stars #five:checked ~ .result::before {
content: "I love it 😍";
}
.stars #four:checked ~ .result::before {
content: "I like it 🤪";
}
.stars #three:checked ~ .result::before {
content: "It's good 😎";
}
.stars #two:checked ~ .result::before {
content: "I don't like it 🥱";
}
.stars #one:checked ~ .result::before {
content: "I hate it 😠";
}