Home > Net >  How do I prevent the color of the link from turning blue when clicked?
How do I prevent the color of the link from turning blue when clicked?

Time:07-30

im use tailwind css in next js.

<a href="#" className="active:bg-none  hover:bg-transparent focus:bg-transparent visited:bg-transparent">link</a>

and even in css i've added this

a:focus, a:active, a:visited {border: none; outline: none; text-decoration: none; background-color: transparent; background: transparent; }

CodePudding user response:

Add the following css rule:

a {
    color: rgb(0, 102, 204);
}

CodePudding user response:

Add a color to your css code to specify a color, for example

a:focus, a:active, a:visited {color: blue; border: none; outline: none; text-decoration: none; background-color: transparent; background: transparent; }

None of the properties you use alter color so the default link, link:visited etc colors still apply

  • Related