无论如何(在CSS中)避免在页面中引入的文本和链接的下划线..?


当前回答

这将删除您的颜色以及锚标签存在的下划线

a {
  text-decoration: none;
}

a:hover {
  color: white;
  text-decoration: none;
  cursor: pointer;
}

其他回答

不要忘记使用link标记来包含样式表

http://www.w3schools.com/TAGS/tag_link.asp

或者将CSS包含在网页的样式标签中。

<style>
  a { text-decoration:none; }
  p { text-decoration:underline; }
</style>

我不建议在除链接之外的任何地方使用下划线,下划线通常被接受为可点击的东西。如果它不可点击,就不要下划线。

CSS基础知识可以在w3schools学习

使用CSS删除文本装饰。

a {
  text-decoration: none;
}

css是

text-decoration: none;

and

text-decoration: underline;

如果你只是想从锚链接中删除下划线,最好的选择-

#content a {
    text-decoration-line:none;
}

这将删除下划线。

此外,您也可以使用类似的语法来操作其他样式,使用-

text-decoration: none;
text-decoration-color: blue;
text-decoration-skip: spaces;
text-decoration-style: dotted;

希望这能有所帮助!

附注:这是我第一次回答!

有时它会被一些渲染UI CSS覆盖。更好的用法:

a.className {
  text-decoration: none !important;
}