CSS Toggles |
Toggle Switch Using CSS, Toggle Switches are very popular When Its comes to designing them but most of the beginners found it tough but truth is Creating Toggles are very Easy you just need to under the concept or working of it that’s all after this you can create your own creative toggles Using CSS.
Beginners and Intermediate.
Code : (If you wanted to Download Animated Toggle Design, Click Here)
<!DOCTYPE html>
<html>
<head>
<title>Creating Toggle Switch</title>
<style type="text/css">
*{
margin: 0px;
padding: 0px;
}
body{
margin: 30%;
}
label{
width: 80px;
height: 30px;
position: relative;
display: inline-block;
}
span{
position: absolute;
width: 80px;
height: 30px;
background-color: grey;
top: 0px;
left: 0px;
right: 0px;
bottom: 0px;
border-radius: 20px;
}
span::before{
content: "";
position: absolute;
width: 20px;
height: 20px;
background-color: white;
border-radius: 50%;
top: 5px;
left: 5px;
transition: .4s;
}
input{
visibility: hidden;
}
input:checked + span::before{
transform: translateX(50px);
}
input:checked + span{
background: linear-gradient(to right, royalblue, skyblue);
}
</style>
</head>
<body>
<label>
<input type="checkbox">
<span></span>
</label>
<br/>
<br/>
<label>
<input type="checkbox">
<span></span>
</label>
</body>
</html>
https://youtu.be/0RRUOIvmuWA I realized that I had my camera set up incorrectly, so when I upload…
https://youtu.be/C3oFfV20K_c Make Animated progress step bar using Figma
https://youtu.be/o3pSH_oRzko How to Hide All Grids in Figma
https://youtu.be/hdSUylKSsho How to Create Responsive Tool tip in Figma
https://youtu.be/AEiH7dSDhKo Having issue in figma pixel grid? learn how to show/ hide figma pixel grid…
https://youtu.be/iilYzHg9LwQ There are some issues going on in ventura OS its still in development phase…
View Comments
Great information,I really like it...
education overseas|.best study abroad consultants |abroad education consultants |study abroad without ielts |study overseas consultants