Simple Reset Mobile Default style

Source: Internet
Author: User

*, *:before, *:after {-webkit-user-select:none;  -webkit-tap-highlight-color:rgba (0, 0, 0, 0); -moz-tap-highlight-color:rgba (0, 0, 0, 0);//Clicking a tag in the mobile system will trigger the default highlighted background frame, similar to the default style of outline, but more simple and brutal-moz-user-select:- moz-none;//prohibit users to select text,-moz-none, is written to the old version of the FF method, of course, the new version is also an upward compatible-webkit-touch-callout:none;//is currently a private property,  ios2.0 above the safari implementation is good, Android has not supported margin:0;  padding:0;  -webkit-box-sizing:border-box;//sets the width value of the element, border-box including-moz-box-sizing:border-box;  Box-sizing:border-box; -ms-touch-action:pan-y;}

-moz-tap-highlight-color:rgba (0, 0, 0, 0); Clicking on a tag in the mobile system will trigger the default highlight background frame, similar to the default style of outline, but more simple and brutal, want to have a unified experience, will be cleared away.

-ms-user-select can set 4 values:

    • text– can select text
    • element– can select text, but the selection range is constrained by the bounds of the element
    • None – Can not select text
    • auto– You can select text if the element contains editable text, such as an INPUT element or an element of editable content. Otherwise, whether the element content can be selected is determined by the value of the parent node.

-webkit-touch-callout

Disables or displays the system default menu when you touch and hold the touch target. On iOS, when you touch and hold the target of a touch, such as a link, the Safari browser will display a link about the system default menu. This property allows you to disable the system default menu.

-ms-touch-action

---------------Add Touch effects to the element under IE10

  • Auto default, allows browser to add touch behavior to elements
  • None does not allow the default touch behavior
  • Pan-x allows panning of the horizontal axis touch drive
  • Pan-y allows panning of the vertical axis touch drive
  • Pinch-zoom allow drag-and-drop scaling
  • Manipulation allows touch-driven panning and drag scaling
  • Double-tap-zoom allows the entire page to double-click to zoom the specified element
  • Inherit inherit the value of the parent element

Simple Reset Mobile Default style

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.