gpt4 book ai didi

html - 文字装饰 : none using table --having trouble

转载 作者:行者123 更新时间:2023-11-28 16:11:56 25 4
gpt4 key购买 nike

虽然这对你们大多数人来说似乎微不足道,但对于某些人来说,我无法在表格单元格中应用 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 应用于 anchor 标记。

通常 anchor 标签的颜色是'紫色'(#0000EE;),如果你看到任何地方,
例如:google 搜索结果所有链接都包含紫色链接。

如果我们应用 color: 'inherit',父级的颜色将应用于覆盖默认颜色的 anchor ,如果它也不是黑色,您可以显式声明 color: 'black ' 到那个 anchor 。

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>

关于html - 文字装饰 : none using table --having trouble,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38217021/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com