开发者

Make link color same as text color without knowing text color?

开发者 https://www.devze.com 2023-04-05 19:46 出处:网络
Is there some CSS t开发者_运维百科hat I can use to set the link color to be the same value as normal text? Simply set

Is there some CSS t开发者_运维百科hat I can use to set the link color to be the same value as normal text?


Simply set

a { color: inherit; }

edit: you may need to add

a { color: inherit !important; }

but best practices suggest you avoid using the !important over-ride.


Just a small addition:

a{ 
  color: inherit; 
}

a:visited{
  color:inherit;
}

a:hover{
  color:inherit;
}
0

精彩评论

暂无评论...
验证码 换一张
取 消