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