用css画一个圆形里有一个对勾或者叉叉的图标
<!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>用css画一个圆形里有一个对勾或者叉叉的图标</title>
<style>
.checkmark {
width: 40px;
height: 40px;
border-radius: 40px;
background: #009933;
display: inline-block;
position: relative;
}
.checkmark:before,
.checkmark::after {
content: "";
height: 28px;
width: 6px;
border-radius: 10px;
display: block;
background: white;
position: absolute;
top: 6px;
left: 20px;
transform: rotate(45deg);
-ms-transform: rotate(45deg);
}
.checkmark::before {
height: 15px;
transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
position: absolute;
top: 18px;
left: 8px;
}
.fork {
width: 40px;
height: 40px;
border-radius: 40px;
background: red;
display: inline-block;
position: relative;
}
.g-right {
display: inline-block;
width: 30px;
height: 4px;
background: #fff;
line-height: 0;
font-size: 0;
vertical-align: middle;
-webkit-transform: rotate(45deg);
position: absolute;
top: 16px;
left: 5px;
}
.g-right:after {
content: "/";
display: block;
width: 30px;
height: 4px;
background: #fff;
-webkit-transform: rotate(-90deg);
}
</style>
</head>
<body>
<div class="checkmark"></div>//对号
<div class="fork">//叉叉
<div class="g-right"></div>
</div>
</body>
</html>
![效果图](https://i-blog.csdnimg.cn/blog_migrate/ba8b169fce79783c6bb547c9ef7a0b21.png)