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

Detailed usage of MYSQL row_number() and over() functions

Syntax format: row_number() over(partition by gro...

Detailed tutorial on installing MySQL 5.7.20 on RedHat 6.5/CentOS 6.5

Download the rpm installation package MySQL offic...

Vue implements file upload and download functions

This article example shares the specific code of ...

Web page experience: Web page color matching

<br />The color of a web page is one of the ...

Define your own ajax function using JavaScript

Since the network requests initiated by native js...

MySQL DATE_ADD and ADDDATE functions add a specified time interval to a date

MySQL DATE_ADD(date,INTERVAL expr type) and ADDDA...

4 functions implemented by the transform attribute in CSS3

In CSS3, the transform function can be used to im...

An example of using CSS methodologies to achieve modularity

1. What are CSS methodologies? CSS methodologies ...

Detailed examples of float usage in HTML/CSS

1. Basic usage examples of float 1. Let's fir...

JavaScript Array Methods - Systematic Summary and Detailed Explanation

Table of contents Common array methods Adding and...

How to monitor global variables in WeChat applet

I recently encountered a problem at work. There i...

Click the toggle button in Vue to enable the button and then disable it

The implementation method is divided into three s...

Vue realizes the palace grid rotation lottery

Vue implements the palace grid rotation lottery (...