پیشنمایش زنده
کد HTML
<input class="dial-checkbox" type="checkbox" />
کد CSS
body {
background: #ede4d1;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.dial-checkbox {
appearance: none;
width: 60px;
height: 60px;
background: radial-gradient(circle at center, #d7c7b0, #b49a7d);
border: 4px solid #5a3d2b;
border-radius: 50%;
position: relative;
box-shadow:
inset -3px -3px 6px #fff,
inset 3px 3px 6px #a78c6c,
0 4px 10px rgba(0, 0, 0, 0.2);
cursor: pointer;
transition: 0.4s ease;
}
.dial-checkbox::before {
content: "";
position: absolute;
top: 50%;
left: 50%;
width: 6px;
height: 20px;
background: #5a3d2b;
border-radius: 3px;
transform-origin: center bottom;
transform: translate(-50%, -100%) rotate(-45deg);
transition: 0.4s ease;
}
.dial-checkbox:checked::before {
transform: translate(-50%, -100%) rotate(45deg);
background: #2c1e14;
}
.dial-checkbox:hover {
box-shadow:
inset -2px -2px 4px #fff,
inset 2px 2px 4px #8b7156,
0 6px 14px rgba(0, 0, 0, 0.3);
transform: scale(1.05);
}