美化复选框

<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>canvas</title>
    <script src="http://www.likecs.com/js/jquery-1.9.1.min.js"></script>
</head>
<body>

<style>
.Checkbox{
    position: relative;
}
.regular-checkbox{
    display: none;
}
.regular-checkbox + label {
    background-color: #fafafa;
    border: 1px solid #cacece;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05), inset 0px -15px 10px -12px rgba(0,0,0,0.05);
    padding: 9px;
    border-radius: 3px;
    display: inline-block;
    position: relative;
}

.regular-checkbox + label:active, .regular-checkbox:checked + label:active {
    box-shadow: 0 1px 2px rgba(0,0,0,0.05), inset 0px 1px 3px rgba(0,0,0,0.1);
}

.regular-checkbox:checked + label {
    background-color: #e9ecee;
    border: 1px solid #adb8c0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05), inset 0px -15px 10px -12px rgba(0,0,0,0.05), inset 15px 10px -12px rgba(255,255,255,0.1);
    color: #99a1a7;
}

.regular-checkbox:checked + label:after {
    content: \'\2714\';
    width: 14px;
    height: 14px;
    font-size: 14px;
    position: absolute;
    top: 0px;
    left: 3px;
    color: #99a1a7;
    /* border-radius: 50px;
   background:url(images/logo.png) repeat;
    box-shadow: inset 0px 0px 10px rgba(0,0,0,0.3);*/

}


.big-checkbox + label {
    padding: 18px;
}
.big-checkbox:checked + label:after {
    content: \'\2714\';
    width: 28px;
    height: 28px;
    font-size:28px;
    position: absolute;
    top: 0px;
    left: 8px;
    color: #99a1a7;
    /*border-radius: 50px;
    background:url(images/logo.png) repeat;
    box-shadow: inset 0px 0px 10px rgba(0,0,0,0.3);*/
}

.tag {
    font-family: Arial, sans-serif;
    width: 200px;
    position: relative;
    top: 5px;
    font-weight: bold;
    text-transform: uppercase;
    display: block;
    float: left;
}


</style>
<div>
    <p> IE9以上版本支持</p>
    <div>
        <div>Checkbox Small</div>
        <input type="checkbox"color: rgba(0, 128, 0, 1)">checkbox-1-1" /><label for="checkbox-1-1"></label>
        <input type="checkbox" /><label for="checkbox-1-2"></label>
        <input type="checkbox" /><label for="checkbox-1-3"></label>
        <input type="checkbox" /><label for="checkbox-1-4"></label>
    </div>
    <br />
    <div>
        <div>Checkbox Big</div>
        <input type="checkbox" /><label for="checkbox-2-1"></label>
        <input type="checkbox" /><label for="checkbox-2-2"></label>
        <input type="checkbox" /><label for="checkbox-2-3"></label>
        <input type="checkbox" /><label for="checkbox-2-4"></label>
    </div>

</div>

</body>
</html>

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zggzxy.html