How to cancel the background color of the a tag when it is clicked in H5

How to cancel the background color of the a tag when it is clicked in H5

1. Cancel the blue color of the a tag when it is clicked on the mobile terminal

a {
 -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
 -webkit-user-select: none;
 -moz-user-focus: none;
    -moz-user-select: none;
}

2. When using an image as the click button of the a tag, there is often a gray background when touchstart is triggered

a,a:hover,a:active,a:visited,a:link,a:focus{
    -webkit-tap-highlight-color:rgba(0,0,0,0);
    -webkit-tap-highlight-color: transparent;
    outline:none;
    background: none;
    text-decoration: none;
}

3. Change the background color of the selected content

::selection { 
    background: #FFF; 
    color: #333; 
} 
::-moz-selection { 
    background: #FFF; 
    color: #333; 
} 
::-webkit-selection { 
    background: #FFF; 
    color: #333; 
}

4. Remove the gray background when clicking the ios input box

-webkit-tap-highlight-color:rgba(0,0,0,0);

5. Remove the blue background when the picture is selected in iOS

img {
 -webkit-tap-highlight-color:rgba(0,0,0,0);
 -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
 -webkit-user-select: none;
 -moz-user-focus: none;
 -moz-user-select: none;
 user-select: none;
}

This is the end of this article about canceling the background color of the a label when it is clicked. For more relevant a label background color content, please search 123WORDPRESS.COM’s previous articles or continue to browse the related articles below. I hope everyone will support 123WORDPRESS.COM in the future!

<<:  The connection between JavaScript constructors and prototypes

>>:  Use CSS to set the width of INPUT in TD

Recommend

HTML table markup tutorial (9): cell spacing attribute CELLSPACING

A certain distance can be set between cells in a ...

Vue routing to implement login interception

Table of contents 1. Overview 2. Routing Navigati...

Complete the search function in the html page

Recently I've been working on a framework tha...

Vue implements simple comment function

This article shares the specific code of Vue to i...

MySQL series tutorials for beginners

Table of contents 1. Basic concepts and basic com...

A brief analysis of the configuration items of the Angular CLI release path

Preface Project release always requires packaging...

Split and merge tables in HTML (colspan, rowspan)

The code demonstrates horizontal merging: <!DO...

Thirty HTML coding guidelines for beginners

1. Always close HTML tags In the source code of p...

Detailed explanation of Vue's keyboard events

Table of contents Common key aliases Key without ...

Mysql index types and basic usage examples

Table of contents index - General index - Unique ...