CSS3 Checkbox Slider

Developer
Size
2,697 Kb
Views
34,408

How do I make an css3 checkbox slider?

A flat unlock button. . What is a css3 checkbox slider? How do you make a css3 checkbox slider? This script and codes were developed by Brad Bodine on 11 August 2022, Thursday.

CSS3 Checkbox Slider Previews

CSS3 Checkbox Slider - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>CSS3 Checkbox Slider</title> <link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700,300' rel='stylesheet' type='text/css'> <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="slide"> <input type="checkbox" value="" id="slide1" name="slide1" /> <label for="slide1"></label> <span></span>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
</body>
</html>

CSS3 Checkbox Slider - Script Codes CSS Codes

.slide { box-sizing: border-box; position: relative; width: 100px; height: 35px; border: 1px solid #646464; border-radius: 50px; overflow: hidden;
}
.slide input[type=checkbox] { visibility: hidden;
}
.slide label { box-sizing: border-box; position: absolute; top: 2px; left: 2px; z-index: 1; width: 29px; height: 29px; background: #0F0F0E; border-radius: 100%; cursor: pointer; -webkit-transition: all 0.4s ease; transition: all 0.4s ease;
}
.slide label:after { position: absolute; top: 25%; right: 42%; content: '-'; color: #FFD431;
}
.slide input[type=checkbox]:checked + label { left: 67px;
}
.slide input[type=checkbox]:checked + label:after { top: 30%; right: 30%; content: '\02713'; color: #FFD431;
}
.slide span { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #313131; -webkit-transition: all 0.4s ease; transition: all 0.4s ease;
}
.slide span:after { position: absolute; right: 22px; z-index: 0; content: 'Unlock'; font: 10px/34px Arial, sans-serif; color: #fff;
}
.slide input[type=checkbox]:checked ~ span { background: #FFD431;
}
.slide input[type=checkbox]:checked ~ span:after { content: '';
}
body, html { background: #0F0F0F;
}
CSS3 Checkbox Slider - Script Codes
CSS3 Checkbox Slider - Script Codes
Home Page Home
Developer Brad Bodine
Username bbodine1
Uploaded August 11, 2022
Rating 3
Size 2,697 Kb
Views 34,408
Do you need developer help for CSS3 Checkbox Slider?

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!

Brad Bodine (bbodine1) Script Codes
Create amazing captions 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!