效果图
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/696962759f59cd6b92ee67d1c5c64390.png)
代码
<!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>
* {
padding: 0;
margin: 0;
}
body {
width: 200px;
margin: 200px auto;
}
//注意这里要设置定位是relative
#hr {
position: relative;
}
//主要是下面的css
#hr::before {
content: "";
display: block;
width: 0;
height: 0;
border: 6px solid transparent;
border-left-color: #e8e8e8;
position: absolute;
bottom: -13px;
right: 0px;
}
#hr::after {
content: "";
display: block;
width: calc(100% - 10px);
height: 2px;
background-color: #e8e8e8;
position: relative;
top: 8px;
}
</style>
</head>
<body>
<div id="hr"></div>
</body>
</html>