101 lines
1.9 KiB
CSS
101 lines
1.9 KiB
CSS
body {
|
|
background: #000;
|
|
|
|
text-align: center;
|
|
}
|
|
.ques {
|
|
color: darkslateblue;
|
|
}
|
|
.switch {
|
|
position: relative;
|
|
display: inline-block;
|
|
width: 65px;
|
|
height: 25px;
|
|
}
|
|
|
|
.switch input {display:none;}
|
|
|
|
.slider {
|
|
position: absolute;
|
|
cursor: pointer;
|
|
overflow: hidden;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background-color: #f2f2f2;
|
|
-webkit-transition: .4s;
|
|
transition: .4s;
|
|
}
|
|
|
|
.slider:before {
|
|
position: absolute;
|
|
z-index: 2;
|
|
content: "";
|
|
height: 24px;
|
|
width: 24px;
|
|
left: 0.5px;
|
|
bottom: 0.5px;
|
|
background-color: darkslategrey;
|
|
-webkit-box-shadow: 0 0.5px 1.25px rgba(0, 0, 0, 0.22);
|
|
box-shadow: 0 0.5px 1.25px rgba(0, 0, 0, 0.22);
|
|
-webkit-transition: .4s;
|
|
transition: all 0.4s ease-in-out;
|
|
}
|
|
.slider:after {
|
|
position: absolute;
|
|
left: 0;
|
|
z-index: 1;
|
|
content: "เปิด";
|
|
font-size: 16px;
|
|
text-align: left !important;
|
|
line-height: 25px;
|
|
padding-left: 0;
|
|
width: 65px;
|
|
color: #fff;
|
|
height: 25px;
|
|
border-radius: 25px;
|
|
background-color: #ff6418;
|
|
-webkit-transform: translateX(-40px);
|
|
-ms-transform: translateX(-40px);
|
|
transform: translateX(-40px);
|
|
transition: all 0.4s ease-in-out;
|
|
}
|
|
|
|
input:checked + .slider:after {
|
|
-webkit-transform: translateX(0px);
|
|
-ms-transform: translateX(0px);
|
|
transform: translateX(0px);
|
|
/*width: 235px;*/
|
|
padding-left: 10px;
|
|
}
|
|
|
|
input:checked + .slider:before {
|
|
background-color: #fff;
|
|
}
|
|
|
|
input:checked + .slider:before {
|
|
-webkit-transform: translateX(40px);
|
|
-ms-transform: translateX(40px);
|
|
transform: translateX(40px);
|
|
}
|
|
|
|
/* Rounded sliders */
|
|
.slider.round {
|
|
border-radius: 25px;
|
|
}
|
|
|
|
.slider.round:before {
|
|
border-radius: 50%;
|
|
}
|
|
.absolute-no {
|
|
position: absolute;
|
|
left: 0;
|
|
color: darkslategrey;
|
|
text-align: right !important;
|
|
font-size: 16px;
|
|
width: calc(100% - 10px);
|
|
height: 25px;
|
|
line-height: 25px;
|
|
cursor: pointer;
|
|
} |