默认链接颜色为蓝色。如何移除HTML超链接标记<a>的默认链接颜色
发布于 2011-07-17 16:21:42
The inherit value
a { color: inherit; } …将使元素呈现其父元素的颜色(我认为这就是您正在寻找的颜色)。
下面是一个现场演示:
a {
  color: inherit;
}<p>The default color of the html element is black. The default colour of the body and of a paragraph is inherited. This
  <a href="http://example.com">link</a> would normally take on the default link or visited color, but has been styled to inherit the color from the paragraph.</p>
发布于 2011-07-17 15:22:19
尝试如下所示:
a {
    color: #0060B6;
    text-decoration: none;
}
a:hover {
    color:#00A0C6; 
    text-decoration:none; 
    cursor:pointer;  
}如果text-decoration不起作用,则将其更改为:
text-decoration: none !important;!important规则覆盖text-decoration属性的所有其他样式。你可以阅读更多关于它的here。
发布于 2018-08-08 21:32:11
如果您不想看到浏览器提供的下划线和默认颜色,可以将以下代码保留在main.css文件的顶部。如果您需要不同的颜色和装饰样式,您可以使用下面的代码片段轻松地覆盖默认值。
 a, a:hover, a:focus, a:active {
      text-decoration: none;
      color: inherit;
 }https://stackoverflow.com/questions/6722467
复制相似问题