我的站点上有下面的CSS和标记,当我悬停在Account链接上时会产生下划线。
默认情况下,下划线显示在文本之外的一个像素上。是否有可能使下划线直接在文本下,而没有一个像素的间隙。
我想为我的网站上的所有链接,如果可能的话。
a:active {
outline: none;
}
a.current {
text-decoration: underline;
color: #000000;
outline: none;
}
a:hover, a.active {
color: #000000;
outline: medium none;
text-decoration: underline;
}
<a href="http://www.ayrshireminis.com/account/login/">Account</a>发布于 2012-08-07 13:55:47
您可能希望使<a>成为一个块,否则填充不会产生任何效果。
a { display: block; line-height:0.75em; ... etc }
a:hover { border-bottom:1px solid #000; }
http://jsfiddle.net/y49jN/3/
https://stackoverflow.com/questions/11847131
复制相似问题