mirror of
https://github.com/uiverse-io/galaxy.git
synced 2025-11-28 13:10:21 +08:00
70 lines
1.4 KiB
HTML
70 lines
1.4 KiB
HTML
<div class="radio-input">
|
|
<input value="value-1" name="value-radio" id="value-1" type="radio">
|
|
<div class="plus1">
|
|
<div class="plus2"></div>
|
|
</div>
|
|
<input value="value-2" name="value-radio" id="value-2" type="radio" checked="">
|
|
<div class="plus1">
|
|
<div class="plus2"></div>
|
|
</div>
|
|
<input value="value-3" name="value-radio" id="value-3" type="radio">
|
|
<div class="plus1">
|
|
<div class="plus2"></div>
|
|
</div>
|
|
</div>
|
|
<style>
|
|
/* From Uiverse.io by Praashoo7 - Tags: neumorphism, red, realistic, radio, cross */
|
|
.radio-input {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.radio-input input {
|
|
appearance: none;
|
|
width: 2em;
|
|
height: 2em;
|
|
background-color: #171717;
|
|
box-shadow: inset 2px 5px 10px rgb(5, 5, 5);
|
|
border-radius: 5px;
|
|
transition: .4s ease-in-out;
|
|
}
|
|
|
|
.radio-input input:hover {
|
|
scale: 1.2;
|
|
cursor: pointer;
|
|
box-shadow: none;
|
|
}
|
|
|
|
.radio-input .plus1 {
|
|
position: relative;
|
|
top: 0.01em;
|
|
left: -1.45em;
|
|
width: 1.3em;
|
|
height: 0.2em;
|
|
background-color: red;
|
|
rotate: 45deg;
|
|
scale: 0;
|
|
border-radius: 5px;
|
|
transition: .4s ease-in-out;
|
|
}
|
|
|
|
.radio-input .plus2 {
|
|
position: relative;
|
|
width: 1.3em;
|
|
height: 0.2em;
|
|
background-color: red;
|
|
transform: rotate(90deg);
|
|
border-radius: 5px;
|
|
transition: .4s ease-in-out;
|
|
}
|
|
|
|
.radio-input input:checked {
|
|
box-shadow: none;
|
|
}
|
|
|
|
.radio-input input:checked + .plus1 {
|
|
transform: rotate(180deg);
|
|
scale: 1;
|
|
}
|
|
</style>
|