How to remove iPhone <button> styling?

故事扮演 提交于 2021-01-26 19:30:05

问题


http://ingoodtastemag.com/

On an iPhone, the button is round with a gradient. However, on every other desktop browser and Android that we've tested so far, it is square. I want the button to stay square. What CSS resets do I need for this?


回答1:


This rounded corner is the default property of the Safari browser and iOS 5 devices. To overwrite it, use the following styling for your button:

-webkit-appearance: none;
border-radius: 0;



回答2:


You could try to use this property on your button attribute.

border-radius: 0



回答3:


To keep your own border radius while removing the iOS styling

-webkit-appearance: none;
-webkit-border-radius: none;
border-radius: 10px;

You must remove webkit's border-radius to get your own style back, but you can still add your own border-radius after you remove theirs.



来源:https://stackoverflow.com/questions/22874336/how-to-remove-iphone-button-styling

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!