【发布时间】:2014-05-29 10:40:58
【问题描述】:
我想为链接使用边框底线(不是文本装饰下划线)。 但我需要让线条更靠近文本。负填充是不可能的,我该怎么办?这是一个例子:
a {
color: #245fc1;
position: relative;
border-bottom: 1px solid #245fc1;
padding-bottom: 0px;
text-decoration: none;
}
<a href="#">i want the line to be nearer</a> on the text
<bR/> because if i write in second line the bottom line from above is too close.
<bR/> using text-decoration: underline is not an option for me!
【问题讨论】:
-
如果你有兴趣使用脚本来解决你的问题,你可以查看这个演示jsfiddle.net/viphalongpro/2JSY4/21。请注意,使用脚本为您提供了最漂亮的解决方案。