IOS Pure CSS Slide Toggle Checkbox

Developer
Size
2,374 Kb
Views
24,288

How do I make an ios pure css slide toggle checkbox?

An iOS style slide toggle using only CSS and native html elements - the checkbox.. What is a ios pure css slide toggle checkbox? How do you make a ios pure css slide toggle checkbox? This script and codes were developed by Chris Sargent on 29 November 2022, Tuesday.

IOS Pure CSS Slide Toggle Checkbox Previews

IOS Pure CSS Slide Toggle Checkbox - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>iOS Pure CSS Slide Toggle Checkbox</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <label class="toggle"> <input type="checkbox"> <div class="slide-toggle"></div>
</label>
</body>
</html>

IOS Pure CSS Slide Toggle Checkbox - Script Codes CSS Codes

input[type=checkbox] { display: none;
}
.slide-toggle { display: block; position: relative; -webkit-box-flex: 0; -ms-flex: none; flex: none; width: 50px; height: 30px; border-radius: 30px; background-color: #d7d2cb; cursor: pointer; -webkit-transition: all 0.1s ease-in-out; transition: all 0.1s ease-in-out; z-index: 1; margin: 10px;
}
.slide-toggle::before,
.slide-toggle::after { content: ' '; display: block; position: absolute; top: 1px; border-radius: 30px; height: 28px; background-color: #fff; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); -webkit-transition: 0.2s cubic-bezier(0, 1.1, 1, 1.1); transition: 0.2s cubic-bezier(0, 1.1, 1, 1.1);
}
.slide-toggle::before { z-index: -1; width: 48px; right: 1px; -webkit-transform: scale(1); transform: scale(1);
}
.slide-toggle::after { z-index: 1; width: 28px; left: 1px; box-shadow: 0 1px 4px 0.5px rgba(0, 0, 0, 0.25);
}
input:checked + .slide-toggle { background-color: #4dde5e;
}
input:checked + .slide-toggle::before { -webkit-transform: scale(0); transform: scale(0);
}
input:checked + .slide-toggle::after { -webkit-transform: translate3d(20px, 0, 0); transform: translate3d(20px, 0, 0);
}
IOS Pure CSS Slide Toggle Checkbox - Script Codes
IOS Pure CSS Slide Toggle Checkbox - Script Codes
Home Page Home
Developer Chris Sargent
Username ChrisSargent
Uploaded November 29, 2022
Rating 3
Size 2,374 Kb
Views 24,288
Do you need developer help for IOS Pure CSS Slide Toggle Checkbox?

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!

Chris Sargent (ChrisSargent) Script Codes
Create amazing sales emails with AI!

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!