forked from uiverse-io/galaxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRatinax_cold-rabbit-43.html
105 lines (96 loc) · 1.91 KB
/
Ratinax_cold-rabbit-43.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
<div class="radio-input">
<input
value="value-1"
name="value-radio"
id="value-1"
type="radio"
class="star s1"
/>
<input
value="value-2"
name="value-radio"
id="value-2"
type="radio"
class="star s2"
/>
<input
value="value-3"
name="value-radio"
id="value-3"
type="radio"
class="star s3"
/>
<input
value="value-4"
name="value-radio"
id="value-4"
type="radio"
class="star s4"
/>
<input
value="value-5"
name="value-radio"
id="value-5"
type="radio"
class="star s5"
/>
</div>
<style>
/* From Uiverse.io by Ratinax - Tags: */
.radio-input {
display: flex;
scale: 0.15;
transform: rotate(180deg);
}
.star {
margin: 1em;
appearance: none;
--color: white;
border-left: 6.4721359549996em solid transparent;
border-right: 6.4721359549996em solid transparent;
border-bottom: 4em solid var(--color);
transform: rotate(0deg);
cursor: pointer;
}
.star:before {
content: "";
border-left: 6.4721359549996em solid transparent;
border-right: 6.4721359549996em solid transparent;
border-top: 4em solid var(--color);
position: absolute;
left: -6.4721359549996em;
transform: rotate(108deg);
}
.star:after {
content: "";
border-left: 6.4721359549996em solid transparent;
border-right: 6.4721359549996em solid transparent;
border-top: 4em solid var(--color);
position: absolute;
left: -6.4721359549996em;
transform: rotate(253deg);
}
.radio-input > .star:hover ~ .star,
.radio-input > .star:hover,
.radio-input > .star:checked ~ .star,
.radio-input > .star:checked {
--color: yellow;
}
.radio-input > .star:checked ~ .star,
.radio-input > .star:checked {
animation: rotate 0.5s linear forwards;
transform: rotate(360deg);
transition: transform 0.3s;
}
@keyframes rotate {
0% {
transform: rotate(0deg);
}
50% {
scale: 1.5;
}
100% {
transform: rotate(360deg);
}
}
</style>