Simple use of WebKit attributes in CSS

Source: Internet
Author: User

Today-WebKit-tap-Highlight-color in CSS, Do not understand, so check the WebKit attributes of CSS to remember.

Note:ForWebKitAttribute ,"WebKit"WebKit kernel browsers (Safari, chrome, iPhone, iPad, Android, etc)

Special WebKit attributes

-WebKit-tap-Highlight-color

This attribute is only used for iOS (iPhone and iPad ). When you click a link or click an element defined by JavaScript, a translucent gray background appears. To reset the performance, you can set-WebKit-tap-Highlight-color to any color. To disable this highlight, set the Alpha value of the color to 0.

Browser support: Only IOs (iPhone and iPad ).

-WebKit-nbsp-Mode

Line feed is sometimes tricky: Sometimes you want the text to be broken (rather than broken) where appropriate, and sometimes you don't want. A property that can control this is-WebKit-nbsp-mode, which allows you to change the & nbsp; blank character behavior and force the text to break lines where it is used. Set the value to space.

-WebKit-Mask

-WebKit-mask makes it possible to add masks to an element, so that you can create patterns of any shape. The mask can be a css3 gradient or translucent PNG image. When the Alpha value of the masked element is 0, the following elements are overwritten. When the Alpha value is 1, the following content is fully displayed. Related attributes include-WebKit-mask-clip,-WebKit-mask-position, and-WebKit-mask-repeat, which are heavily dependent on the syntax in the background. For more information, see https://www.webkit.org/blog/181/css-masks/

WebKit-text-stroke

One disadvantage of CSS borders is that only rectangular elements can be used. -WebKit-text-stroke can be used to add borders for text. It not only sets the width of the text border, but also sets its color. In addition, you can use the color: transparent attribute to create a hollow font!

More WebKit application see: https://www.webkit.org/blog/

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.