码迷,mamicode.com
首页 > Web开发 > 详细

css实现自定义的单选框or复选框

时间:2015-06-11 19:33:54      阅读:125      评论:0      收藏:0      [点我收藏+]

标签:

/*radio css 单选框*/.hidden-input { opacity: 0; position: absolute; z-index: -1; } input[type=radio]+span { /* your style goes here */ display: inline-block; height: 1.5em; width: 1.5em; border-radius: 50%; background-color: #ddd; } /* active style goes here */ input[type=radio]:checked+span { background-color: #d85d4b; }/*checkbox css复选框*/input[type=checkbox]+span { display: inline-block; height: 1.5em; width: 1.5em; border-radius: 4px; background-color: #ddd; }input[type=checkbox]:checked+span:after { content: ""; background-image: url("images/select.png"); position: absolute; width: 20px; height: 20px; left: 50%; margin-left: -10px; top: 50%; margin-top: -6px; background-repeat: no-repeat; }/* checkbox html code*/

购买主板房+硬装选配+软装选配

</div/*radoi html code*/
房多多

css实现自定义的单选框or复选框

标签:

原文地址:http://blog.csdn.net/u011011025/article/details/46459039

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!