Home > Web Front-end > CSS Tutorial > Example analysis on css canceling the background color of a tag when clicking on the mobile terminal

Example analysis on css canceling the background color of a tag when clicking on the mobile terminal

黄舟
Release: 2017-08-04 10:31:48
Original
2198 people have browsed it

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

-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
-webkit-user-select: none;
-moz-user-focus: none;
-moz-user-select: none;
  
Copy after login

2. When using a picture as the click button of the a tag, when touchstart is triggered, there will often be A gray background

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;
}
Copy after login

 
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; 
}
Copy after login

 4. Remove the ios input box when clicking Gray background

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

The above is the detailed content of Example analysis on css canceling the background color of a tag when clicking on the mobile terminal. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
css
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template