forked from uiverse-io/galaxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathYaya12085_tough-rat-92.html
92 lines (77 loc) · 3.06 KB
/
Yaya12085_tough-rat-92.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
<div class="radio-input">
<input checked="" value="color-1" name="color" id="color-1" type="radio">
<label for="color-1">
<span>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><g stroke-width="0" id="SVGRepo_bgCarrier"></g><g stroke-linejoin="round" stroke-linecap="round" id="SVGRepo_tracerCarrier"></g><g id="SVGRepo_iconCarrier"> <g id="Interface / Check"> <path stroke-linejoin="round" stroke-linecap="round" stroke-width="2" stroke="#ffffff" d="M6 12L10.2426 16.2426L18.727 7.75732" id="Vector"></path> </g> </g></svg>
</span>
</label>
<input value="color-2" name="color" id="color-2" type="radio">
<label for="color-2">
<span>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><g stroke-width="0" id="SVGRepo_bgCarrier"></g><g stroke-linejoin="round" stroke-linecap="round" id="SVGRepo_tracerCarrier"></g><g id="SVGRepo_iconCarrier"> <g id="Interface / Check"> <path stroke-linejoin="round" stroke-linecap="round" stroke-width="2" stroke="#ffffff" d="M6 12L10.2426 16.2426L18.727 7.75732" id="Vector"></path> </g> </g></svg>
</span>
</label>
<input value="color-3" name="color" id="color-3" type="radio">
<label for="color-3">
<span>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><g stroke-width="0" id="SVGRepo_bgCarrier"></g><g stroke-linejoin="round" stroke-linecap="round" id="SVGRepo_tracerCarrier"></g><g id="SVGRepo_iconCarrier"> <g id="Interface / Check"> <path stroke-linejoin="round" stroke-linecap="round" stroke-width="2" stroke="#ffffff" d="M6 12L10.2426 16.2426L18.727 7.75732" id="Vector"></path> </g> </g></svg>
</span>
</label>
</div>
<style>
/* From Uiverse.io by Yaya12085 - Tags: radio */
.radio-input {
background-color: #fff;
padding: 20px;
border-radius: 20px;
display: flex;
}
.radio-input input[type=radio] {
display: none;
}
.radio-input input[type=radio] + label {
color: #333;
font-family: Arial, sans-serif;
font-size: 14px;
}
.radio-input input[type=radio] + label span {
display: inline-block;
width: 40px;
height: 40px;
margin: -1px 4px 0 0;
vertical-align: middle;
cursor: pointer;
border-radius: 50%;
border: 2px solid #FFFFFF;
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.33);
background-repeat: no-repeat;
background-position: center;
text-align: center;
line-height: 44px;
}
.radio-input input[type=radio] + label span svg {
opacity: 0;
transition: all 0.3s ease;
}
.radio-input input[type=radio]#color-1 + label span {
background-color: #2ecc71;
}
.radio-input input[type=radio]#color-2 + label span {
background-color: #3498db;
}
.radio-input input[type=radio]#color-3 + label span {
background-color: #f1c40f;
}
.radio-input input[type=radio]:checked + label span svg {
opacity: 1;
}
.radio-input:has(input[type=radio]#color-1:checked) {
background-color: #2ecc71;
}
.radio-input:has(input[type=radio]#color-2:checked) {
background-color: #3498db;
}
.radio-input:has(input[type=radio]#color-3:checked) {
background-color: #f1c40f;
}
</style>