如何删除 html 超链接“a”标签的默认链接颜色?
P粉432906880
P粉432906880 2023-08-23 16:28:59
0
2
798
<p>默认链接颜色为蓝色。 如何删除 html 超链接标签 <code><a></a></code><a> 的默认链接颜色?</a></p>
P粉432906880
P粉432906880

모든 응답(2)
P粉403804844

继承值

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>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!