CSS removes browser default outline outlines

Source: Internet
Author: User

By default, when you click the a tag, input, or add the click event, the browser leaves a contour outline (blue below chrome) ~ However these default outline outlines, sometimes it affects the aesthetics, not what we want to keep. How do we get rid of these nasty contour frames?

Using Outline:none to remove outline frames

Such as:

a { outline:none;}

PC-side outline frame disappears, but found on the phone still exists ~ ~

Add the following code to

a {     outline:none;       -webkit-tap-highlight-color:rgba (0,0,0,0);}

-webkit-tap-highlight-color is a non-canonical attribute (unsupported WebKit property) that does not appear in the draft CSS specification.

Overrides the highlighted color of the display when the user clicks on a link in the iOS Safari browser or a clickable element of JavaScript.

This property can only set transparency. If transparency is not set, IOS Safari uses the default transparency. When transparency is set to 0, this property is disabled, and when the transparency is set to 1, the element is not visible when clicked.

Grammar:

-webkit-tap-highlight-color: Color

default value : Inherit

applies to : link elements such as new window open, IMG elements such as saving images and so on

Value:
Color: Color Values
Transparent: Transparent Value

* CSS3 new properties may be described errors and changes, for reference only, continuous update

Compatibility:
    • IOS 1.1.1 and later versions of Safari browser available
    • Most Android phones are also supported, but show different results.

CSS removes browser default outline outlines

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.