How to remove the default link color of the html hyperlink 'a' tag?

后端 未结 12 2128
时光说笑
时光说笑 2020-12-07 08:56

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

相关标签:
12条回答
  • 2020-12-07 09:27

    Simply add this in CSS,

    a {
        color: inherit;
        text-decoration: none;
    }
    

    that's it, done.

    0 讨论(0)
  • 2020-12-07 09:28
    <style>
    a {
    color:      ;
    }
    </style>
    

    This code changes the color from the default to what is specified in the style. Using a:hover, you can change the color of the text from the default on hover.

    0 讨论(0)
  • 2020-12-07 09:31

    you can do some thing like this:

    a {
        color: #0060B6;
        text-decoration: none;
    }
    
    a:hover 
    {
         color:#00A0C6; 
         text-decoration:none; 
         cursor:pointer;  
    }
    

    if text-decoration doesn't work then include text-decoration: none !important;

    0 讨论(0)
  • 2020-12-07 09:32

    You can use System Color (18.2) values, introduced with CSS 2.0, but deprecated in CSS 3.

    a:link, a:hover, a:active { color: WindowText; }
    

    That way your anchor links will have the same color as normal document text on this system.

    0 讨论(0)
  • 2020-12-07 09:36

    This is also possible:

            a {
                all: unset;
            }
    

    unset: This keyword indicates to change all the properties applying to the element or the element's parent to their parent value if they are inheritable or to their initial value if not. unicode-bidi and direction values are not affected.

    Source: Mozilla description of all

    0 讨论(0)
  • 2020-12-07 09:36
    a:link{color:inherit;}
    

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

    0 讨论(0)
提交回复
热议问题