Mobile End Click event appears background box and PC end a label click on the Background box??? __ Mobile End

Source: Internet
Author: User

1, Reason: Mobile End event response will have the default background box color, a label active also has the default background box color.


2, the solution:

(1) Moving end let the background box not show

-webkit-tap-highlight-color:rgba (0, 0, 0, 0);
-moz-tap-highlight-color:rgba (0, 0, 0, 0);
-ms-tap-highlight-color:rgba (0, 0, 0, 0);
-o-tap-highlight-color:rgba (0, 0, 0, 0);
Tap-highlight-color:rgba (0, 0, 0, 0);

(2) PC side the background frame color when a label is active

a:active{
  Background-color: The color you want to set;


3. Additional tips:

Usually when we select text, the background color is blue. We can use the following style to set the page selection style:

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

If you want to remove the color of the selected, the background are set to none on the line.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.