Option toggle CSS only
How do I make an option toggle css only?
Option toggle CSS only. What is a option toggle css only? How do you make a option toggle css only? This script and codes were developed by Tiberiu Raducea on 25 September 2022, Sunday.
Option toggle CSS only - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Option toggle CSS only</title> <link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="center-everything-cause-we-can"> <label for="contract_toggle" class="contract_toggle"> With Contract? <input type="checkbox" id="contract_toggle" name="contract_toggle"/> <span class="toggle_bar"> <span class="toggle_square"></span> </span>
</label>
</div>
</body>
</html>
Option toggle CSS only - Script Codes CSS Codes
@import url("https://fonts.googleapis.com/css?family=Rubik");
* { margin: 0; padding: 0;
}
html { height: 100%;
}
body { font: 100% 'Rubik', sans-serif; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; height: 100%;
}
.toggle_bar { text-align: center; border: 1px solid #999; background: #afafaf; width: 70px; display: block; box-sizing: border-box; height: 30px; position: relative; overflow: hidden; margin: 1em auto;
}
.toggle_bar .toggle_square { -webkit-transition: left .3s ease; transition: left .3s ease; background: red; position: absolute; top: 0; left: calc(70px - 30px); width: 30px; height: 100%; box-shadow: 0 4px 16px 8px rgba(0, 0, 0, 0.15);
}
.toggle_bar .toggle_square:before { content: "No"; display: block; color: white; line-height: 30px; text-align: center; font-size: 12px; text-transform: uppercase;
}
.contract_toggle input[type=checkbox] { display: none; position: absolute; -webkit-appearance: none; -moz-appearance: none; appearance: none;
}
.contract_toggle input[type=checkbox]:checked ~ .toggle_bar .toggle_square { background: green; left: 0;
}
.contract_toggle input[type=checkbox]:checked ~ .toggle_bar .toggle_square:before { content: "Yes";
}
.center-everything-cause-we-can { -ms-flex-item-align: center; -ms-grid-row-align: center; align-self: center; display: block;
}
Developer | Tiberiu Raducea |
Username | tyberiu88 |
Uploaded | September 25, 2022 |
Rating | 3 |
Size | 2,758 Kb |
Views | 22,264 |
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 |
Sonar profile pic | 4,370 Kb |
Very basic mobile menu with foundation 6 | 3,730 Kb |
Different Sort of Pagination | 4,744 Kb |
A Pen by Tiberiu Raducea | 9,212 Kb |
Add to Basket like a boss | 4,541 Kb |
A Pen by Tiberiu Raducea | 4,171 Kb |
Cookie policy Sass options | 3,167 Kb |
Wedding loader | 3,401 Kb |
Radar pulse | 1,654 Kb |
Sticky button bottom header | 2,802 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 |
A Pen by Jay | Jaycode | 3,784 Kb |
Custom Checkbox and radio inputs SCSS | Rgfx | 3,367 Kb |
Pure CSS Tooltips | Mobius1 | 2,271 Kb |
A Pen by Paul Sullivan | Pwsm50 | 2,349 Kb |
Getting Started | Viblast | 1,500 Kb |
Ocean | Gordonnl | 2,817 Kb |
LBCA - Mail canvas | Emnbdx | 3,856 Kb |
Cool audio | Bigliam | 1,868 Kb |
Multi-step GSAP animation | Acacheung | 2,668 Kb |
Ghost | Mghayour | 11,738 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!