<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.active{
margin: 0px;
padding: 0px;
width: 20px;
height: 20px;
border: 3px solid #e99b2d;
border-radius: 1px;
}
input{
display: none;
}
label{
display: block;
margin: 2px;
padding: 0px;
width: 16px;
height: 16px;
background-color: #f0ad4e;
border-radius: 1px;
opacity: 0;
}
input:checked + label{
opacity: 1;
}
</style>
</head>
<body>
<div class="active">
<input type="checkbox" id="checkbox">
<label for="checkbox"></label>
</div>
</body>
</html>
CSS-checkbox美化
最新推荐文章于 2023-11-22 16:12:44 发布