gpt4 book ai didi

html - 如何删除 html 超链接 'a' 标签的默认链接颜色?

转载 作者:IT老高 更新时间:2023-10-28 11:05:16 25 4
gpt4 key购买 nike

默认链接颜色为蓝色。如何删除 html 超链接标签的默认链接颜色 <a> ?

最佳答案

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>

关于html - 如何删除 html 超链接 'a' 标签的默认链接颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6722467/

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