Remove button native style from iOS

Source: Internet
Author: User

The button style appears normal in Android phone browser, but in IOS Safari you will see the button displayed as a rounded style, set border-radius:0; Not so.

This is because Safari parsing on iphone, IPad device input[type= "Submit" and input[type= "reset" button will be rendered in the default UI of Apple Browser, so that we don't need a style.

The workaround (default UI rendering for Apple) is to add a line of CSS code (the style of the reset button) to the CSS button style code:

1 -webkit-appearance:none;

Add "-webkit-appearance:none;" in the CSS code. is to tell the browser that the button is not rendered according to the default UI of Apple browser.

In general, add the following consolidation code to the CSS:

1 input[type= "text"], 2 input[type= "Submit"], 3 input[type= "Reset"], 4 input[type= "button"], 5 Button  {outline:0; -webkit-appearance:none;}

Remove button native style from iOS

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.