重写checkbox

 

 

<html>

<body>

<style>
input[type='checkbox']{
width: 14px;
height: 14px;
background-color: #fff;
appearance:none;
-webkit-appearance:none;
-o-appearance:none;
-moz-appearance:none;
border: 1px solid #FFAD01;
border-radius: 2px;
outline: none;
}
input[type=checkbox]:checked{
background: url("https://localhost/null/checkbox%20selected.svg")no-repeat center;
}

input[type=checkbox]:focus{
outline: none;
}
</style>
<input type="checkbox" class="selected" >
</body>
</html>

posted @ 2021-06-18 18:54  吃饭了吗  阅读(81)  评论(0编辑  收藏  举报