文字装饰:没有使用表 - 有麻烦

时间:2016-07-06 05:45:48

标签: html css text-decorations

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

1 个答案:

答案 0 :(得分:1)

如果您想要黑色,请将color: inherit应用于锚标记。

一般锚标记的颜色为紫色&#39;(#0000EE;),如果您看到任何地方,
例如:谷歌搜索结果所有链接都包含紫色链接。

如果我们应用color: 'inherit',则父级的颜色将应用于覆盖默认颜色的锚点,如果它也不是黑色,则可以向该锚点显式声明color: 'black'。 / p>

&#13;
&#13;
table{
  font-size: 50px;
  }

table a{
  text-decoration: none;
  color: inherit
 }
&#13;
<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>
&#13;
&#13;
&#13;