Bouncy Switch
How do I make an bouncy switch?
What is a bouncy switch? How do you make a bouncy switch? This script and codes were developed by Simeon Simeonoff on 17 September 2022, Saturday.
Bouncy Switch - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Bouncy Switch</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="container"> <div class="switch"> <input id="switch" class="switch__ctrl" type="checkbox" /> <label class="switch__lbl" for="switch"></label> </div>
</div>
</body>
</html>
Bouncy Switch - Script Codes CSS Codes
html,
body { height: 100%; box-sizing: border-box; background: #fff;
}
.container { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -ms-flex-align: center; align-items: center; height: 100%;
}
.switch__ctrl { position: absolute; opacity: 0; margin: 0; z-index: -1; width: 0; height: 0; left: 0; overflow: hidden; pointer-events: none;
}
.switch__ctrl:checked ~ .switch__lbl { background: limegreen;
}
.switch__ctrl:checked ~ .switch__lbl:before { -webkit-transform: translate3d(19.27273px, 0, 0); transform: translate3d(19.27273px, 0, 0); -webkit-animation: switch-on .35s ease-out; animation: switch-on .35s ease-out;
}
.switch__lbl { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; position: relative; width: 40px; height: 22.72727px; background: black; opacity: 0.8; border-radius: 11.36364px; cursor: pointer; -webkit-tap-highlight-color: transparent; -webkit-transition: background .45s ease-in-out; transition: background .45s ease-in-out;
}
.switch__lbl:before { position: absolute; content: ' '; width: 18.72727px; height: 18.72727px; background: #fff; border-radius: 50%; -webkit-transform: translate3d(2px, 0, 0); transform: translate3d(2px, 0, 0); -webkit-animation: switch-off .35s ease-out; animation: switch-off .35s ease-out; box-shadow: 0px 1px 5px 0px rgba(0, 0, 0, 0.6), 0px 2px 2px 0px rgba(0, 0, 0, 0.3), 0px 3px 1px -2px rgba(0, 0, 0, 0.3);
}
@-webkit-keyframes switch-off { 0% { -webkit-transform: translate3d(19.27273px, 0, 0); transform: translate3d(19.27273px, 0, 0); } 50% { -webkit-transform: translate3d(2px, 0, 0); transform: translate3d(2px, 0, 0); }
}
@keyframes switch-off { 0% { -webkit-transform: translate3d(19.27273px, 0, 0); transform: translate3d(19.27273px, 0, 0); } 50% { -webkit-transform: translate3d(2px, 0, 0); transform: translate3d(2px, 0, 0); }
}
@-webkit-keyframes switch-on { 0% { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } 50% { -webkit-transform: translate3d(19.27273px, 0, 0); transform: translate3d(19.27273px, 0, 0); }
}
@keyframes switch-on { 0% { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } 50% { -webkit-transform: translate3d(19.27273px, 0, 0); transform: translate3d(19.27273px, 0, 0); }
}
Developer | Simeon Simeonoff |
Username | simeonoff |
Uploaded | September 17, 2022 |
Rating | 3 |
Size | 2,830 Kb |
Views | 28,336 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Material Design Calendar | 4,021 Kb |
Avatar | 2,309 Kb |
Bouncy Switch | 2,830 Kb |
Flexbox SASS Grid | 4,135 Kb |
Material Radio Buttons | 2,938 Kb |
A Pen by Simeon Simeonoff | 2,602 Kb |
Material Inputs | 3,313 Kb |
Flex Table | 4,059 Kb |
Toggle Buttons | 2,666 Kb |
Notification Animation - Bounce Blur | 2,664 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Bootstrap Responsive Menu Drawer | JesseGlacken | 3,777 Kb |
Minimal Material Design Form Input | Koenigsegg1 | 3,076 Kb |
LeMandinque | Aadesida | 9,046 Kb |
Pure CSS Torch Light | Juliendargelos | 2,727 Kb |
Exploring css spinners | Akagr | 3,569 Kb |
Scroll Arrow | Robooneus | 4,437 Kb |
TweenMax transformOrigin Bubble | Nicolund | 2,209 Kb |
Exploding Text | Jjmartucci | 4,749 Kb |
React Recipe Box | Krokodill | 5,347 Kb |
Blockquote design | Sjmcpherson | 1,863 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!