ios系统中input type=text/radio/checkebox取消默认样式

来源:互联网 发布:淘宝客服主管提成方案 编辑:程序博客网 时间:2024/04/25 04:21

问题:iPhone里面radio和checkbox按钮的轮廓去不掉。
就像下面这样,下面抛代码

input[type=radio],input[type=checkbox]{            background: url("images/check.png") no-repeat center/0.8rem 0.8rem;//未选中的背景图片            -webkit-appearance: none;//去掉默认样式            height:1rem;            margin: 0 .4rem 0.1rem .3rem;            width:1rem;            border-radius: 0;            border: none !important;//去掉边框        }        form input[checked]{            -webkit-appearance:none;//去掉默认样式            background: url('images/checked.png') no-repeat center/0.8rem 0.8rem;//选中时的背景图片        }

开始一直被IOS这个按钮的边框所困惑,一直就以为是IOS兼容不好去不掉默认样式,后来试了一下border:none; 就去掉了,!important是我自己加的,怕权重不够。

阅读全文
0 0