Easy CSS3 checkboxes and radio buttons

Developer
Size
2,742 Kb
Views
28,336

How do I make an easy css3 checkboxes and radio buttons?

Explain how to design forms easily width '+' selector and :checked pseudo selector.. What is a easy css3 checkboxes and radio buttons? How do you make a easy css3 checkboxes and radio buttons? This script and codes were developed by Twikito on 11 September 2022, Sunday.

Easy CSS3 checkboxes and radio buttons Previews

Easy CSS3 checkboxes and radio buttons - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Easy CSS3 checkboxes and radio buttons</title> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ input { display:none;
}
input + label span { content:""; display:inline-block; width:19px; height:19px; margin:-1px 4px 0 0; vertical-align:middle; background:url(https://d3pr5r64n04s3o.cloudfront.net/tuts/391_checkboxes/check_radio_sheet.png) no-repeat; cursor:pointer;
}
input[type="checkbox"] + label span { background-position:left top; }
input[type="radio"] + label span { background-position:-38px top; }
input[type="checkbox"]:checked + label span { background-position:-19px top; }
input[type="radio"]:checked + label span { background-position:-57px top; }
/* BLAH BLAH */
body { background:url(http://subtlepatterns2015.subtlepatterns.netdna-cdn.com/patterns/low_contrast_linen.png) repeat; font:14px/20px Verdana; color:#aaa; }
div { width:150px; margin:50px auto; }
input:checked + label { color:#fff; } </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div> <p> <input type="checkbox" id="c1"> <label for="c1"><span></span>Check Box 1</label> </p> <p> <input type="checkbox" id="c2"> <label for="c2"><span></span>Check Box 2</label> </p> <p> <input type="radio" id="r1" name="rgroup"> <label for="r1"><span></span>Radio Button 1</label> </p> <p> <input type="radio" id="r2" name="rgroup"> <label for="r2"><span></span>Radio Button 2</label> </p>
</div>
<!-- Another Pen? codepen.io/Twikito --> <script src="js/index.js"></script>
</body>
</html>

Easy CSS3 checkboxes and radio buttons - Script Codes CSS Codes

input { display:none;
}
input + label span { content:""; display:inline-block; width:19px; height:19px; margin:-1px 4px 0 0; vertical-align:middle; background:url(https://d3pr5r64n04s3o.cloudfront.net/tuts/391_checkboxes/check_radio_sheet.png) no-repeat; cursor:pointer;
}
input[type="checkbox"] + label span { background-position:left top; }
input[type="radio"] + label span { background-position:-38px top; }
input[type="checkbox"]:checked + label span { background-position:-19px top; }
input[type="radio"]:checked + label span { background-position:-57px top; }
/* BLAH BLAH */
body { background:url(http://subtlepatterns2015.subtlepatterns.netdna-cdn.com/patterns/low_contrast_linen.png) repeat; font:14px/20px Verdana; color:#aaa; }
div { width:150px; margin:50px auto; }
input:checked + label { color:#fff; }

Easy CSS3 checkboxes and radio buttons - Script Codes JS Codes

/*
Original by Nick Dugger on WebDesignTuts+
https://webdesign.tutsplus.com/tutorials/htmlcss-tutorials/quick-tip-easy-css3-checkboxes-and-radio-buttons/
Pseudo elements :before and :after are not recommanded because click and cursor does not work without padding hack
DON'T FORGET THE :disabled PSEUDO SELECTOR
*/
Easy CSS3 checkboxes and radio buttons - Script Codes
Easy CSS3 checkboxes and radio buttons - Script Codes
Home Page Home
Developer Twikito
Username Twikito
Uploaded September 11, 2022
Rating 3.5
Size 2,742 Kb
Views 28,336
Do you need developer help for Easy CSS3 checkboxes and radio buttons?

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!

Twikito (Twikito) 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!