ios6,plus上box-shaow失效的原因

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/arthurwanggang/article/details/72085634

今天在项目中帮别人该代码,在ios上怎么都没有作用,翻阅MDN也是支持的,又把很久之前我写的代码翻出来看了一下,基本的属性都是一样的。唯一的就是我的代码上有(一贯的写法,以前也没深究)

    -webkit-appearance: none;

这代码,把这代码加上去就好了,那追究原因这是为什么呢?

其实是ios系统会默认使用自己的系统样式,从box-shadow,以及checkbox.圆角问题,都是系统默认使用的样式

input[type="button"], 
input[type="submit"], 
input[type="reset"] {    
-webkit-appearance: none;    
}  
textarea {  
-webkit-appearance: none;
}
.button{ border-radius: 0; }

貌似是很简单,现实中却很是有用

猜你喜欢

转载自blog.csdn.net/arthurwanggang/article/details/72085634