自定义复选框样式

demo图:

 

 上代码:

<input type="checkbox">记住我</label>


//未选中样式
input[type="checkbox"] {
  -webkit-appearance: none;  /*清除复选框默认样式*/
  background: url(./images/wexuanz.png);   /*复选框的自定义背景图,尺寸自己设定好,不然显示不全*/
  height: 14px;   /*高度*/
  vertical-align: middle;
  width: 14px;
}
//选中样式
input[type="checkbox"]:checked {
    background: url(./images/xuanzhong.png);
}

 更多链接: https://www.cnblogs.com/qqfontofweb/p/7017229.html

posted @ 2020-04-07 11:30  大熊丨rapper  阅读(115)  评论(0编辑  收藏  举报