Pure {CSS3} Radio & Checkbox

Size
3,085 Kb
Views
28,336

How do I make an pure {css3} radio & checkbox?

What is a pure {css3} radio & checkbox? How do you make a pure {css3} radio & checkbox? This script and codes were developed by Renaud Tertrais on 12 August 2022, Friday.

Pure {CSS3} Radio & Checkbox Previews

Pure {CSS3} Radio & Checkbox - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Pure {CSS3} Radio & Checkbox</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <h1>Pure <code>{CSS3}</code> Radio & Checkbox</h1>
<div id="wrapper">
<div class="inputs">
<input type="radio" name="radio" id="radio1" checked="checked"/>
<label for="radio1">radio 1</label>
<input type="radio" name="radio" id="radio2" />
<label for="radio2">radio 2</label> <input type="radio" name="radio" id="radio3"/>
<label for="radio3">radio 3</label>
<input type="radio" name="radio" id="radio4" disabled="disabled"/>
<label for="radio4">disabled</label>
</div>
<div class="inputs">
<input type="checkbox" id="checkbox1" checked="checked"/>
<label for="checkbox1">checkbox 1</label>
<input type="checkbox" id="checkbox2" />
<label for="checkbox2">checkbox 2</label>
<input type="checkbox" id="checkbox3"/>
<label for="checkbox3">checkbox 3</label>
<input type="checkbox" id="checkbox4" disabled="disabled"/>
<label for="checkbox4">disabled</label>
</div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
</body>
</html>

Pure {CSS3} Radio & Checkbox - Script Codes CSS Codes

@import url(http://fonts.googleapis.com/css?family=Pacifico);
body { text-align: center; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; background-color: #DBC; color: #433;
}
h1 { font-family: 'Pacifico'; font-size: 40px;
}
#wrapper { display: inline-block; text-align: left;
}
#wrapper .inputs { float: left; margin: 30px;
}
input[type=radio] { display: none;
}
input[type=radio] + label { position: relative; padding-left: 1.5em; line-height: 1em; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
}
input[type=radio] + label:before, input[type=radio] + label:after { position: absolute; content: ''; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
}
input[type=radio] + label:before { height: 16px; width: 16px; left: 0; bottom: 0; border: 2px solid #433; background-color: #af9494;
}
input[type=radio][disabled=disabled] + label { opacity: .5;
}
input[type=radio] + label:before, input[type=radio] + label:after { -moz-border-radius: 1000px; -webkit-border-radius: 1000px; border-radius: 1000px;
}
input[type=radio]:checked + label:before { background-color: transparent; z-index: 2;
}
input[type=radio]:checked + label:after { height: 16px; width: 16px; background-color: #433; left: 0; bottom: 0; z-index: 1; background-color: #433; border: 4px solid #af9494;
}
input[type=checkbox] { display: none;
}
input[type=checkbox] + label { position: relative; padding-left: 1.5em; line-height: 1em; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
}
input[type=checkbox] + label:before, input[type=checkbox] + label:after { position: absolute; content: ''; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
}
input[type=checkbox] + label:before { height: 16px; width: 16px; left: 0; bottom: 0; border: 2px solid #433; background-color: #af9494;
}
input[type=checkbox][disabled=disabled] + label { opacity: .5;
}
input[type=checkbox] + label:before { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px;
}
input[type=checkbox]:checked + label:after { width: 16px; height: 9.6px; border-bottom: 0.2em solid #433; border-left: 0.2em solid #433; bottom: .5em; left: .1em; -moz-transform: rotate(-45deg); -ms-transform: rotate(-45deg); -webkit-transform: rotate(-45deg); transform: rotate(-45deg);
}
label { display: block; margin-bottom: 10px; font-size: 16px; font-weight: 500; cursor: pointer;
}
Pure {CSS3} Radio & Checkbox - Script Codes
Pure {CSS3} Radio & Checkbox - Script Codes
Home Page Home
Developer Renaud Tertrais
Username renaudtertrais
Uploaded August 12, 2022
Rating 3
Size 3,085 Kb
Views 28,336
Do you need developer help for Pure {CSS3} Radio & Checkbox?

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!

Renaud Tertrais (renaudtertrais) Script Codes
Create amazing art & images 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!