Simple CSS Checkbox
How do I make an simple css checkbox?
Simple CSS-only checkbox. Revisited.Thanks to https://twitter.com/dansimau for the focus state suggestion!. What is a simple css checkbox? How do you make a simple css checkbox? This script and codes were developed by Chris Burnell on 16 September 2022, Friday.
Simple CSS Checkbox - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Simple CSS Checkbox</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <input type="checkbox" id="jazzycheckbox" role="checkbox" aria-checked="false">
<label for="jazzycheckbox" class="check">Check me!</label> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
</body>
</html>
Simple CSS Checkbox - Script Codes CSS Codes
@charset "UTF-8";
html,
body { height: 100%;
}
body { font: 600 20px/3em sans-serif; position: relative;
}
input[type="checkbox"] { opacity: 0; position: absolute; left: 0; bottom: 100%;
}
.check { background-color: lightgray; background-clip: padding-box; color: dimgray; display: block; padding: 0 2.5em; overflow: hidden; position: absolute; top: 50%; left: 50%; white-space: nowrap; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border-radius: .375em; -webkit-transform: translateX(-50%) translateY(-50%); transform: translateX(-50%) translateY(-50%); -webkit-transition: all .15s ease-in-out .1s; transition: all .15s ease-in-out .1s;
}
input[type="checkbox"]:focus + .check { box-shadow: 0 0 0 0.3em rgba(105, 105, 105, 0.8);
}
input[type="checkbox"]:checked + .check { background-color: darkseagreen; color: snow; padding-right: 1.5em; padding-left: 3.5em;
}
input[type="checkbox"]:checked:focus + .check { box-shadow: 0 0 0 0.3em rgba(105, 105, 105, 0.2);
}
.check:before { content: "✔"; color: snow; font-size: 1.5em; position: absolute; top: 0; left: 1em; -webkit-transform: translateX(-2em); transform: translateX(-2em); -webkit-transition: all .15s ease-in-out; transition: all .15s ease-in-out;
}
input[type="checkbox"]:checked + .check:before { -webkit-transform: none; transform: none; -webkit-transition: all .25s ease-in-out; transition: all .25s ease-in-out;
}
Developer | Chris Burnell |
Username | chrisburnell |
Uploaded | September 16, 2022 |
Rating | 3 |
Size | 2,797 Kb |
Views | 66,792 |
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 |
Clock Face Idea | 3,196 Kb |
Psychedelic Slice | 2,681 Kb |
Simple CSS Checkbox | 3,244 Kb |
New Brandings | 5,617 Kb |
Persistent Light Source Transform | 2,785 Kb |
Zoomy Anchor Thing | 2,680 Kb |
Category Hover Demo | 3,469 Kb |
Globule Bleu Jobs Page Anchor Rollover Effect | 2,533 Kb |
Simple CSS Checkbox | 2,797 Kb |
Infinite Square | 2,937 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 |
Tooltip in table | Roine | 3,713 Kb |
A Pen by boilzzz | Boilzzz | 2,761 Kb |
Medium Menu | Lucasmotta | 3,923 Kb |
Progressively reveal dots on a Bezier curve | GreenSock | 2,489 Kb |
Heatmap Color Scales | Stevepepple | 2,331 Kb |
Angular Sandbox | Alexgurrola | 1,616 Kb |
Speech bubbles | Something | 1,547 Kb |
Background-blend-mode Test | 0x04 | 4,744 Kb |
Bootstrap Responsive Menu Drawer | JesseGlacken | 3,777 Kb |
WRENCH - STAFF | Lolita-adams | 1,608 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!