【发布时间】:2015-11-10 23:25:17
【问题描述】:
我有以下代码:
<html>
<head>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<style>
.nodecor
{
text-decoration: none;
}
.strowb1
{
width: 150px;
height: 35px;
background-color: #1F375F;
text-align: center;
color: #999999;
font-family: calibri;
font-weight: bold;
font-size: 110%;
display: block;
}
.fullcell
{
height: 100%;
width: 100%;
color: #999999;
}
</style>
</head>
<body>
<table>
<tr>
<td class="strowb1">
<a class="nodecor" href="#">
<div class="fullcell">Watch</div>
</a>
</td>
</tr>
</table>
</body>
</html>
执行时,“Watch”在悬停时会有一个非常持久的下划线。设置text-decoration: none 似乎并没有删除它。
我已经尝试在表格、tr、td 和 div 上将 text-decoration 设置为 none。
请提出建议。
注意:删除引导 css 的链接确实会删除下划线,但我在代码的其他区域需要它。
【问题讨论】:
-
如果它适合你试试这个:
.nodecor { text-decoration: none !important; }
标签: html css twitter-bootstrap-3