+ 6
About <a></a> tag from HTML
When I press the link , the background of the link becomes blue for a second. How can I delete that style? I searched on the internet , but I didn't found a solution.
6 Réponses
+ 3
You can disable it using CSS.
a {
-tap-highlight-color: rgba(0,0,0,0);
-webkit-tap-highlight-color: transparent;
}
+ 8
Hm...I found the best way to do that. By deleting the href.
+ 6
Oh , that is not good.... 😢
I found everything about how to remove the text-decoration and color of link , but I didn't found anything for background. Now I understand why.
Thank you Airree !
+ 3
No, you can't, it's the only indication (that can't be turned off) that this is, in fact, a link
+ 3
Try this;
<style>
a:link {color:green; background-color:transparent; text-decoration:none}
a:visited {color:pink; background-color:transparent; text-decoration:none}
a:hover {color:red; background-color:transparent; text-decoration:underline}
a:active {color:yellow; background-color:transparent; text-decoration:underline}
</style>
0
You can try:
a:hover {color:red; background-color:transparent; text-decoration:underline}
a:link {color:green; background-color:transparent; text-decoration:none}
a:visited {color:pink; background-color:transparent; text-decoration:none}
a:active {color:yellow; background-color:transparent; text-decoration:underline}