单选框:
<!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>
.box {
width: 300px;
height: 300px;
margin: 100px auto;
}
input[type="radio"]::before {
position: relative;
content: "";
top: -1px;
left: -1px;
width: 17px;
height: 17px;
display: block;
border-radius: 50%;
background-color: #fff;
border: 1px solid #6b4bff;
z-index: 5;
}
input[type="radio"]:checked::after {
position: relative;
content: "";
bottom: 15px;
left: 4px;
width: 9px;
height: 9px;
display: block;
border-radius: 50%;
visibility: visible;
background-color: #6b4bff;
z-index: 6;
}
</style>
</head>
<body>
<div class="box">
<input type="radio">
</div>
</body>
</html>
效果图:

复选框:
<!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>
.box {
width: 300px;
height: 300px;
margin: 100px auto;
}
input[type=checkbox]{
cursor: pointer;
position: relative;
width: 15px;
height: 15px;
font-size: 14px;
}
input[type=checkbox]::after{
position: absolute;
top: 0;
border: none;
/* background-color: #ff670c; */
color: #fff;
width: 15px;
height: 15px;
display: inline-block;
visibility: visible;
padding-left: 0px;
text-align: center;
content: ' ';
border-radius: 1px
}
input[type=checkbox]:checked::after{
background-color: #6b4bff;
border-color: #6b4bff;
content: "✓";
font-size: 12px;
font-weight: bold;
}
</style>
</head>
<body>
<div class="box">
<input type="checkbox">
<input type="checkbox">
</div>
</body>
</html>
效果图:
