Custom animated checkboxes

Developer
Size
2,818 Kb
Views
4,048

How do I make an custom animated checkboxes?

What is a custom animated checkboxes? How do you make a custom animated checkboxes? This script and codes were developed by Ajay Karwal on 26 December 2022, Monday.

Custom animated checkboxes Previews

Custom animated checkboxes - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Custom animated checkboxes</title> <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> <div class="wrap"> <h1>Custom checkboxes with animated check state</h1> <ul> <li> <input id="option1" type="checkbox" value="option-1" checked /> <label for="option1">Option 1</label> </li> <li> <input id="option2" type="checkbox" value="option-2" checked /> <label for="option2">Option 2</label> </li> <li> <input id="option3" type="checkbox" value="option-3" /> <label for="option3">Option 3</label> </li> <li> <input id="option4" type="checkbox" value="option-4" /> <label for="option4">Option 4</label> </li> <li> <input id="option5" type="checkbox" value="option-5" checked /> <label for="option5">Option 5</label> </li> </ul> <br /> <br /> <small class="credit">Made with ♥ by <a href="https://twitter.com/ajaykarwal" target="_blank">Ajay Karwal</a></small>
</div>
</body>
</html>

Custom animated checkboxes - Script Codes CSS Codes

body { box-sizing: border-box; background: #f3f1e7; padding: 40px; margin: auto; font-weight: normal; color: #111;
}
.wrap { width: 450px; margin: auto; text-align: center;
}
h1 { font-weight: inherit; color: inherit;
}
small { font-size: 11px; color: #666;
}
small a { color: inherit;
}
ul { list-style: none; margin: 0; padding: 0;
}
ul li { margin-bottom: 10px;
}
ul li input[type="checkbox"] { position: absolute; left: -9999px;
}
ul li input[type="checkbox"]:focus + label { outline: -webkit-focus-ring-color auto 5px;
}
ul li input[type="checkbox"] + label { position: relative; padding-left: 25px; padding-top: 2px; cursor: pointer;
}
ul li input[type="checkbox"] + label::before { content: ''; position: absolute; left: 0; top: 1px; width: 16px; height: 16px; border: 1px solid #999; background: white; border-radius: 3px;
}
ul li input[type="checkbox"] + label::after { content: ''; position: absolute; top: 4px; left: 3px; width: 12px; height: 12px; border-radius: 2px; background: #cc0066; -webkit-transition: all .3s; transition: all .3s;
}
ul li input[type="checkbox"]:not(:checked) + label:after { opacity: 0; -webkit-transform: scale(0); transform: scale(0);
}
ul li input[type="checkbox"]:checked + label:after { opacity: 1; -webkit-transform: scale(1); transform: scale(1);
}
Custom animated checkboxes - Script Codes
Custom animated checkboxes - Script Codes
Home Page Home
Developer Ajay Karwal
Username ajaykarwal
Uploaded December 26, 2022
Rating 3
Size 2,818 Kb
Views 4,048
Do you need developer help for Custom animated checkboxes?

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!

Ajay Karwal (ajaykarwal) Script Codes
Create amazing marketing copy 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!