Super simple CSS custom checkbox
How do I make an super simple css custom checkbox?
Use labels "for" to check and uncheck checkboxes, hide the real checkboxes then style your label.. What is a super simple css custom checkbox? How do you make a super simple css custom checkbox? This script and codes were developed by Sébastien Lombard on 16 September 2022, Friday.
Super simple CSS custom checkbox - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Super simple CSS custom checkbox</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css'>
<link rel='stylesheet prefetch' href='css/https___codepen_io_sebl_p.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <header id="title"> <h1><i class="ion-ios7-checkmark"></i> Super simple CSS custom checkbox</h1> <p>Works with radio buttons too.</p>
</header>
<input type="checkbox" id="myCheckbox"/>
<label for="myCheckbox"> <i class="ion-ios7-checkmark"></i> Click me!
</label>
<h2>With checkbox visible so you can see how it reacts</h2>
<input type="checkbox" id="myCheckbox2"/>
<label for="myCheckbox2"> <i class="ion-ios7-checkmark"></i> Click me!
</label> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
</body>
</html>
Super simple CSS custom checkbox - Script Codes CSS Codes
body { text-align: center; font-family: sans-serif;
}
h2 { text-transform: uppercase; margin: 4rem 0 2rem 0;
}
input[type="checkbox"] { display: none;
}
input[type="checkbox"] + label { -webkit-transition: all 300ms ease; transition: all 300ms ease; font-size: 2rem; cursor: pointer; border-radius: 0.3rem; background-color: #ecf0f1; padding: 0.5rem 1rem; display: inline-block; -moz-user-select: -moz-none; -webkit-user-select: none; -ms-user-select: none; user-select: none;
}
input[type="checkbox"] + label i { color: #bdc3c7;
}
input[type="checkbox"]:checked + label { -webkit-transition: all 300ms ease; transition: all 300ms ease; background-color: #2ecc71;
}
input[type="checkbox"]:checked + label i { color: white; -webkit-animation: check 1s; animation: check 1s;
}
#myCheckbox2 { display: inline;
}
Developer | Sébastien Lombard |
Username | SebL |
Uploaded | September 16, 2022 |
Rating | 4.5 |
Size | 2,990 Kb |
Views | 109,296 |
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 |
SoundCloud Mini player with css record animation | 5,024 Kb |
Responsive grid template editor concept | 4,205 Kb |
NgServerMessages | 3,106 Kb |
ES6 Class to get query params in string url or array of string urls | 3,158 Kb |
Simple 2 sides title animation | 2,306 Kb |
Perspective modal window | 3,724 Kb |
Bloc hover animation | 3,452 Kb |
Super quick responsive parametric grid generator with SASS | 4,000 Kb |
Handles | 1,792 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 |
Wikipedia Viewer | Odylic | 2,333 Kb |
Haml Calendar | Katydecorah | 5,643 Kb |
Mostly Fluid | Mccreath | 3,308 Kb |
Search Box in Content Moves to Fixed Header | Chriscoyier | 2,768 Kb |
ABVI Menu Discarded | Overdrivemachines | 3,607 Kb |
CMP5-Opdracht15 | SannevanGastel | 2,733 Kb |
Css3 slide | Nakome | 3,190 Kb |
Project -Show the Local Weather | Luciano_Britis | 2,583 Kb |
Flex layout example | Mofny | 1,663 Kb |
Animated Donut Chart | Jplhomer | 3,808 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!