Source: Internet
Author: User


This property is used to set the color of the background box that the element responds to when a click event is triggered on a mobile device (such as adnroid, IOS).

For example, in the Adnroid version, when you click the A tab, an orange small box will appear to indicate the response of the click.

At this point, if you set the Tap-highlight-color value for the element, for example:

-webkit-tap-highlight-color:rgba (240,240,240,0.7);

You can change the color of the background frame when the element is clicked.

If you want the background box to not appear, you can set the alpha value in Rgba to 0, such as RGBA (0,0,0,0)

There's also a way to set the color of the selected text.

The background color is usually blue when we select text. We can use the following style to set the style of the page's selection:

:: 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 selection, set the background to none.


Related Article

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.