input[type="checkbox"] {
-webkit-appearance: none; /* 去除默认外观 */
-moz-appearance: none;
appearance: none;
border: 1px solid #ccc; /* 边框 */
width: 15px; /* 宽度 */
height: 15px; /* 高度 */
border-radius: 10px; /* 圆角 */
outline: none; /* 去除外部轮廓 */
transition: all 0.3s ease; /* 过渡效果 */
}
input[type="checkbox"]:checked{
background: url('../../assets/img/对号.png') no-repeat center center #E16C00;
background-size: .3733rem .3733rem;
}
css自定义input checkbox样式
最新推荐文章于 2023-12-08 15:43:11 发布