【发布时间】:2012-05-10 14:16:51
【问题描述】:
悬停时,我的文本链接有下划线。这是 Bootstrap 中的默认设置。
我想保留这个,除非链接在某个 div 内。
我尝试过的代码(以及几个变体)不起作用。
HTML:
<div class="wall-entry span5">
<a href="">
<img src="http://www.placehold.it/290x163" />
<div class="wall-address">
<p>Burgundy Street</p>
<p>New Orleans, LA</p>
<p>USA</p>
</div>
</a>
</div>
我的 CSS:
.wall-entry {
background-color: @black;
position: relative;
img {
opacity:0.4;
filter:alpha(opacity=40); /* For IE8 and earlier */
}
div {
position: absolute;
left: 10px;
bottom: 10px;
p {
line-height: 18px;
margin: 0;
font-family: Neuzit Heavy;
font-size: 18px;
color: white;
text-decoration: none;
}
}
}
div.wall-entry:hover img {
opacity:1;
filter:alpha(opacity=100); /* For IE8 and earlier */
}
a div.wall-entry {text-decoration: none;}
快速说明:我已经测试了a {text-decoration: none;},这确实有效。但是,我不想改变一切。仅此特定案例中的链接。
【问题讨论】:
标签: html css twitter-bootstrap text-decorations