DaRK Mode 3 bergambar
.darkmode-switch {
display: inline-flex;
align-items: center;
justify-content: center;
background-color: transparent;
padding: 10px;
border-radius: 20px;
cursor: pointer;
transition: background-color 0.3s ease-in-out;
position: relative;
}
.darkmode-switch:hover {
background-color: rgba(0, 0, 0, 0.4);
}
.switch-title {
display: inline-block;
margin-right: 4px;
color: #fff;
}
.switch {
display: inline-block;
position: relative;
width: 40px;
height: 24px;
margin-left: 4px;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-image: url("https://example.com/gambar.jpg");
background-size: cover;
transition: 0.4s;
border-radius: 24px;
}
.slider:before {
position: absolute;
content: "";
height: 16px;
width: 16px;
left: 4px;
bottom: 4px;
background-color: #f1f1f1;
transition: 0.4s;
border-radius: 50%;
background-image: url("https://example.com/gambar-matahari.jpg");
background-size: cover;
}
input[type="checkbox"]:checked + .slider:before {
transform: translateX(16px);
background-color: #f1f1f1;
content: "";
background-image: url("https://i.pinimg.com/236x/42/a0/64/42a064491ddff958a8563dfc73ad2cf5.jpg");
background-size: cover;
}
input[type="checkbox"]:checked + .slider {
background-image: url("https://i.pinimg.com/236x/dd/e2/b1/dde2b13ab1cb5565baed10602caa5fc2.jpg");
}
input[type="checkbox"] + .slider:before {
background-image url("https://i.pinimg.com/564x/f1/a2/8e/f1a28ee5d5e01574c49ef8b93b497f1d.jpg");
background-size: cover;
}
Posting Komentar untuk "DaRK Mode 3 bergambar"