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

黄舟
黄舟Original
2017-08-04 10:31:482207browse

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;
  

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;
}

 
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 ios input box when clicking Gray background

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

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!

Statement:
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