-webkit-appearance:none;

Source: Internet
Author: User

Today when chatting in the Web group, I found this thing, I don't seem to know him, so I looked up the information about him:

Copy of the example,

-----------

The buttons in the iOS environment are beautiful, but often we don't need these seemingly corny styles when designing the Web app, so it's necessary to remove them.

The following code resets these styles:

-WebKit-appearance: none;     

In general, when writing mobile Web development, the following CSS code is added to the ZAICOMMON.CSS:

Input[type=button]{-webkit-appearance:none;outline:none}
----------------------------
But I think he seems to have some certainty, not so perfect. As follows:
-------------------------
-webkit-appearance:none result in Unable to get checkbox value

The background of this bug is a bit complicated. Probably is a form forms, want to use validation plugin authentication, Ajax commits. It turns out that the form will be blocked from refreshing the entire page at the time of submission, regardless of the WebKit browser.

Finally caught the culprit is the-webkit-appearance:none attribute on the checkbox.

-webkit-appearance will remove the default style of the elements in the WebKit browser. The checkbox is hidden directly under this attribute. Then use JS to get the checkbox value when the WebKit browser will report a strange error. Re-assigning this element to the-webkit-appearance:checkbox will not give an error.

Other form elements, as well as other cases, are not tested. This issue appears in both Chrome and Safari, and should be a problem with the WebKit engine.

--------------------------

-webkit-appearance: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.