移动端border-radius失效

因为IOS自带样式,移动端div设置的 border-radius 失效解决办法:

.content-div{
    width: 80px;
    height:80px;
    border-radius:40px !important;
}

万能的!important;
在border-radius属性里面添加!important:

CSS中的!important一般都是用于对低版本的除了iE 6 ,用来做hack的,后面缀上了!important的css语句,让浏览器首选执行这个语句,因为css有继承的样式,加上!importanrt可以覆盖父级的样式。

原文地址:https://www.cnblogs.com/wanlibingfeng/p/11926416.html