文本修饰:none 使用 table -- 有问题
Text-decoration: none using table --having trouble
虽然这对你们大多数人来说似乎微不足道,但对于某些人来说,我无法在 table 单元格中应用 text-decoration:none
,如下所示。
我的 css 做错了什么?
任何输入将不胜感激
table{
font-size: 50px;
}
table a{
text-decoration: none;
}
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.6.0/css/font-awesome.min.css" rel="stylesheet"/>
<div>
<table>
<tbody>
<tr>
<td>
<a href="http://www.google.com"><i class="fa fa-quote-left" aria-hidden="true"></i></a>
<p>Quote Master</p>
</td>
</tr>
</tbody>
</table>
</div>
如果您想要黑色,请将 color: inherit
应用于锚标记。
一般锚标签的颜色是'purple'(#0000EE;),如果你看到任何地方,
例如:google 搜索结果所有链接都包含紫色链接。
如果我们应用 color: 'inherit'
,父级的颜色将应用于锚点并覆盖默认颜色,如果它也不是黑色,您可以显式声明 color: 'black'
到该锚点。
table{
font-size: 50px;
}
table a{
text-decoration: none;
color: inherit
}
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.6.0/css/font-awesome.min.css" rel="stylesheet"/>
<div>
<table>
<tbody>
<tr>
<td>
<a href="http://www.google.com"><i class="fa fa-quote-left" aria-hidden="true"></i></a>
<p>Quote Master</p>
</td>
</tr>
</tbody>
</table>
</div>
虽然这对你们大多数人来说似乎微不足道,但对于某些人来说,我无法在 table 单元格中应用 text-decoration:none
,如下所示。
我的 css 做错了什么?
任何输入将不胜感激
table{
font-size: 50px;
}
table a{
text-decoration: none;
}
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.6.0/css/font-awesome.min.css" rel="stylesheet"/>
<div>
<table>
<tbody>
<tr>
<td>
<a href="http://www.google.com"><i class="fa fa-quote-left" aria-hidden="true"></i></a>
<p>Quote Master</p>
</td>
</tr>
</tbody>
</table>
</div>
如果您想要黑色,请将 color: inherit
应用于锚标记。
一般锚标签的颜色是'purple'(#0000EE;),如果你看到任何地方,
例如:google 搜索结果所有链接都包含紫色链接。
如果我们应用 color: 'inherit'
,父级的颜色将应用于锚点并覆盖默认颜色,如果它也不是黑色,您可以显式声明 color: 'black'
到该锚点。
table{
font-size: 50px;
}
table a{
text-decoration: none;
color: inherit
}
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.6.0/css/font-awesome.min.css" rel="stylesheet"/>
<div>
<table>
<tbody>
<tr>
<td>
<a href="http://www.google.com"><i class="fa fa-quote-left" aria-hidden="true"></i></a>
<p>Quote Master</p>
</td>
</tr>
</tbody>
</table>
</div>