-Webkit-appearance: none;, null

Source: Internet
Author: User

-Webkit-appearance: none;, null

When chatting in the web group today, I found this stuff. I don't seem to know him very much, so I checked his information:

Example of copying,

-----------

Buttons in the IOS environment are beautifying, but we usually do not need these seemingly old styles when designing web apps, so it is necessary to remove them.

The following code resets these styles:

-Webkit-appearance: none;

Normally, when we write mobile web development, we will add the following CSS code to zaicommon.css:

Input [type = button] {-webkit-appearance: none; outline: none}
----------------------------
But I think it seems that he is still a bit certain, not so perfect. As follows:
-------------------------
-Webkit-appearance: none. As a result, the checkbox value cannot be obtained.

The background of this BUG is a bit complicated. It is probably a Form, which must be verified by Validation Plugin and submitted by Ajax. The result shows that in the Webkit browser, the whole page is refreshed when the form is submitted.

The final culprit was the-webkit-appearance: none attribute on the checkbox.

-Webkit-appearance removes the default element style from the webkit browser. Checkbox is directly hidden under this attribute. When you use JS to obtain the checkbox value, the Webkit browser reports a strange error. Re-assign this element-webkit-appearance: checkbox and no error will be reported.

Other form elements and other situations are not tested. This problem may occur in Chrome and Safari. It should be a problem with the Webkit engine.

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

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.