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 Checkboxes | 3,262 Kb |
Flex Table | 4,059 Kb |
Notification Animation - Bounce Blur | 2,664 Kb |
Notification Animation | 2,603 Kb |
Grid Layout | 2,845 Kb |
Material Switches | 2,691 Kb |
Toggle Buttons | 2,666 Kb |
Avatar | 2,309 Kb |
Material Inputs | 3,313 Kb |
A Pen by Simeon Simeonoff | 2,602 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 |
Hc first draft | Stepfray | 5,104 Kb |
Price | Catcode | 2,623 Kb |
Google Chrome Icon using Pure CSS in one DIV | Grssam | 3,627 Kb |
Simple content swap | Snografx | 1,859 Kb |
To Do List with Delete | Mattlbrody | 2,068 Kb |
Marching Squares Visualized | Sakri | 7,074 Kb |
Experiments with Vertical Centering | KatieK2 | 3,924 Kb |
CSS Colors | Alexpate | 2,232 Kb |
Cloud upload | Jaflo | 2,774 Kb |
Hmmm... | Rk007 | 4,848 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!