How to remove the default link color of the html h

2019-01-21 02:13发布

The default link color is blue. How to remove the default link color of the html hyperlink tag <a>?

10条回答
混吃等死
2楼-- · 2019-01-21 02:28
.cancela,.cancela:link,.cancela:visited,.cancela:hover,.cancela:focus,.cancela:active{
    color: inherit;
    text-decoration: none;
}

I felt it necessary to post the above class definition, many of the answers on SO miss some of the states

查看更多
何必那么认真
3楼-- · 2019-01-21 02:32

you can do some thing like this:

a {
    color: #0060B6;
    text-decoration: none;
}

a:hover 
{
     color:#00A0C6; 
     text-decoration:none; 
     cursor:pointer;  
}
查看更多
爱情/是我丢掉的垃圾
4楼-- · 2019-01-21 02:33
a:link{color:inherit;}

this is the simple one line can do all stuffs for you <3

查看更多
何必那么认真
5楼-- · 2019-01-21 02:34

You have to use CSS. Here's an example of changing the default link color, when the link is just sitting there, when it's being hovered and when it's an active link.

a:link {
  color: red;
}

a:hover {
  color: blue;
}

a:active {
  color: green;
}
<a href='http://google.com'>Google</a>

查看更多
登录 后发表回答