用css3伪元素写的小例子
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
.aa{
position: relative;
border-bottom: 1px solid #231e1e;
width: 150px;
padding: 10px 5px;
box-sizing: border-box;
}
.aa:after{
content: "";
position: absolute;
height: 10px;
border-left: 1px solid #231e1e;
border-right: 1px solid #231e1e;
box-sizing: border-box;
left: 0;
width: 100%;
}
</style>
</head>
<body>
<div class="aa">123456789987456123</div>
</body>
</html>
效果图