我有需要强调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