Simple toggle
How do I make an simple toggle?
What is a simple toggle? How do you make a simple toggle? This script and codes were developed by on 12 January 2023, Thursday.
Simple toggle - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Simple toggle</title> <link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="container"> <input id="opu-switch" type="checkbox" hidden="hidden"/> <label class="opu-switch" for="opu-switch"></label>
</div>
</body>
</html>
Simple toggle - Script Codes CSS Codes
body { background: #222;
}
.container { position: absolute; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%);
}
.opu-switch { display: inline-block; width: 40px; height: 20px; padding: 4px; border-radius: 20px; background: #dea28e; vertical-align: middle; position: relative; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -webkit-transition: background 350ms ease; transition: background 350ms ease;
}
.opu-switch:before, .opu-switch:after { content: ""; display: block; width: 20px; height: 20px; border-radius: 50%; position: absolute; top: 50%; -webkit-transition: all 350ms cubic-bezier(0, 0.95, 0.38, 0.98), background 150ms ease; transition: all 350ms cubic-bezier(0, 0.95, 0.38, 0.98), background 150ms ease;
}
.opu-switch:before { background: rgba(224, 86, 58, 0.075); -webkit-transform: translate3d(0, -50%, 0) scale(0); transform: translate3d(0, -50%, 0) scale(0);
}
.opu-switch:after { background: #E0563A; -webkit-transform: translate3d(0, -50%, 0); transform: translate3d(0, -50%, 0);
}
.opu-switch:active:before { -webkit-transform: translate3d(0, -50%, 0) scale(3); transform: translate3d(0, -50%, 0) scale(3);
}
input:checked + .opu-switch { background: #C2EBAE;
}
input:checked + .opu-switch:before { background: rgba(111, 181, 76, 0.075); -webkit-transform: translate3d(100%, -50%, 0) scale(1); transform: translate3d(100%, -50%, 0) scale(1);
}
input:checked + .opu-switch:after { background: #6FB54C; -webkit-transform: translate3d(100%, -50%, 0); transform: translate3d(100%, -50%, 0);
}
input:checked + .opu-switch:active:before { background: rgba(111, 181, 76, 0.075); -webkit-transform: translate3d(100%, -50%, 0) scale(3); transform: translate3d(100%, -50%, 0) scale(3);
}
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 |
KYIVSTONER_KEYPAD | 6,702 Kb |
AlbumFront | 3,100 Kb |
Custom Context Menu With Toasts | 5,643 Kb |
Audio Drumpad Sampler | 6,931 Kb |
Angular attempts | 7,167 Kb |
AlbumBack | 2,821 Kb |
Ambitheater | 9,605 Kb |
Vkapi | 2,787 Kb |
Slow laggy attempt | 5,947 Kb |
Rotating rainbow preloader | 3,043 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 Oliver Schafeld | Schafeld | 1,720 Kb |
Smoke Shader - Frame Buffer | Omarshe7ta | 2,672 Kb |
Eunice A | Ejbronze | 2,203 Kb |
Form Labels | Bartuc | 2,717 Kb |
Box Shadow Effects | Retrofuturistic | 2,143 Kb |
Flower expansion | Sreucherand | 3,425 Kb |
Animated SVG stroke-dasharray | Netsi1964 | 3,179 Kb |
Boxes | H3l1um | 2,563 Kb |
My Interests | Anshusaxenaarora | 2,015 Kb |
Reading Grid | Tappily | 4,306 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!