使用jqweui的拓展组件picker的时候,在浏览器尺寸不同的时候,一些尺寸下组件的样式会出错


很容易看出布局出错是因为字体大小过大出错
查看 query-weui.css
html {
font-size: 20px ;
}
body {
font-size: 16px;
}
@media only screen and (min-width: 400px) {
html {
font-size: 21.33333333px !important;
}
}
@media only screen and (min-width: 414px) {
html {
font-size: 22.08px !important;
}
}
@media only screen and (min-width: 480px) {
html {
font-size: 25.6px !important;
}
}
jquery-weui.css对尺寸400px、414px、480px的机型使用了 !important规则
,覆盖了其余的html样式字体申明
在iPhone 6机型下,在Styles 选定全局搜索font-size

发现系统默认的样式CSS中 内联样式将字体设置为 50px


element.style 内联样式,具有最高的优先级,在网上搜索出的方法就是跟jquery-weui.css 对3种尺寸的做法类似,增加!important 规则
,覆盖系统样式
网友评论