我有需要強調HTML文本底部邊框下劃線
<div><span class="text">Underlined</span><br>blah blah</div>
文本因此,它應該是這樣的
Underlined
---
blah blah
我使用SASS/SCSS,我曾嘗試使用:但在元素之前,它並沒有顯示出來。
&>div {
// code
&:before {
//other code
}
}
.text {
font-weight: bold;
&:before {
border-bottom:red solid 1px;
}
}
}
我已經嘗試從字面上的一切。我曾嘗試跨度:之前span::before
.text:before
.text::before
等,但它沒有顯示任何東西。
只有{的.text下邊框:1px的黑色虛線; }不起作用? –
由於保羅Menezes提到檢查這個小提琴http://jsfiddle.net/mxjxgs4j/ –
已經在這裏回答[見這裏](http://stackoverflow.com/questions/32706932/dotted-top-and-bottom-border-shorter -than-text) – Allen