<p>
<input type="checkbox" name="checkbox-1"><label for="checkbox-1"></label>
Select Me
</p>
body{
font-family: sans-serif;
line-height: 1.3;
font-size: 0.9em;
color: #666;
background: #ececec;
padding: 4em;
}
p {
position: relative;
}
p > input[type="checkbox"]{
cursor: pointer;
position: absolute;
left: 3px;
top: 0;
z-index:2;
width: 26px;
height: 26px;
opacity: 0;
vertical-align: middle;
}
p > input[type="checkbox"] +label{
vertical-align: middle;
border: 2px solid #ccc;
background-color: #fff;
height: 26px;
width: 26px;
margin-right: 16px;
display: inline-block;
z-index:1;
position: relative;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
}
p > input[type="checkbox"]:checked+label{
background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #a40017), color-stop(1, #d2828d));
background: -moz-linear-gradient(center bottom, #a40017 0%, #d2828d 100%);
box-shadow: 0 2px 7px rgba(0,0,0, 0.6);
border: 2px solid #fff;
}
p > input[type="checkbox"]:checked+label:after {
content: '\2714';
text-indent: 0;
font-size: 15px;
color: #fff;
position: absolute;
top: 4px;
left: 7px;
width: 13px;
text-shadow: 0 -1px 0 rgba(0,0,0, 0.7);
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.