Look at the sample image文本下划线或边框底部自定义
你能用css实现这种下划线吗?我试着做下面的方式,但我不能提前做出细线,然后再次进行粗线末
h1 {
font-weight: 300;
display: inline-block;
padding-bottom: 5px;
position: relative;
}
h1:before{
content: "";
position: absolute;
width: 25%;
height: 1px;
bottom: 0;
left: 1%;
border-bottom: 10px solid blue;
h1 {
content: "";
position: absolute;
width: 50%;
height: 1px;
bottom: 0;
left: 5%;
border-bottom: 10px solid blue;
}
}
<h1>test text for show</h1>
<p>Desired final style</p>
<img src="https://i.stack.imgur.com/POrU6.png">
谢谢朋友,优秀的解决方案!问候! – Daniel
@丹尼尔不客气。请考虑接受我的回答以及 – LGSon
准备好的朋友,我不能给你票,因为我缺乏15个声望!但检查出来!问候和感谢! – Daniel