<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
.box {
width:200px;
height:200px;
border:1px solid black;
position: relative;
}
.box::before,.box::after {
width:0;
height:0;
content:"";
border:solid transparent ;
position: absolute;
left:100%;
}
.box::after {
border-width: 10px;
border-left-color:white;
top:20px;
}
.box::before {
border-width:12px;
border-left-color: black;
top:18px;
}
</style>
</head>
<body>
<div class="box"></div>
</body>
</html>
画小三角,使用伪元素
最新推荐文章于 2024-04-23 14:33:07 发布