美文网首页
自定义checkbox css样式

自定义checkbox css样式

作者: 匆匆那年_海 | 来源:发表于2019-04-29 11:15 被阅读0次

自定义checkbox css样式


2019-04-29_111938.png
            input[type=checkbox] {
                width:15px;
                height:15px; 
                text-align: center;
            }
            input[type=checkbox]:after {
                width: 100%;
                height: 100%;
                top: 0px;
                content: " ";
                background-color:White;
                color: #000000;
                display: inline-block;
                visibility: visible;
                border-radius: 2px;
                border:1px solid black;
            }
            input[type=checkbox][disabled=disabled]:after {
                width: 100%;
                height: 100%;
                top: 0;
                content: " ";
                background-color:#DCDCDC;
                color: #000000;
                display: inline-block;
                visibility: visible;
                border-radius: 2px;
                border:1px solid #A9A9A9;
            }
            input[type=checkbox]:checked:after {
                content: "\2713";/*UNICODE中对号*/
                font-size: 12px;
                font-weight:bold;
            }

原文作者:匆匆那年_海,博客主页:https://www.jianshu.com/u/910c0667c515
95后前端汉子,爱编程、优秀、聪明、理性、沉稳、智慧的程序猿一枚。

相关文章

网友评论

      本文标题:自定义checkbox css样式

      本文链接:https://www.haomeiwen.com/subject/wqzenqtx.html