答案 0 :(得分:2)
使用:after
在此处创建行
了解:https://developer.mozilla.org/en-US/docs/Web/CSS/::after
div{
color:red;
}
div:after{
content: "";
position: absolute;
width: 100%;
height: 1px;
background-color: red;
top: 20px;
margin-left: 10px;
margin-right: 4px;
}
<div>Header</div>