测试发现在魅族mx5自带浏览器上兼容flex布局,但是不兼容flex-wrap这个属性,
测试环境:mx5,android-5.1,flyme-6.2.0.0A;
发现华为GRA-TL00安卓5.0.1也不行;
caniuse安卓4.4就支持无前缀flex,问题在于不支持flex-wrap;
请问有什么解决方案吗?
更新:
前面表述有误,不算是不支持flex-wrap,应该是表现有差异。
具体测试如下:
css:
.box {
display: flex;
flex-wrap: wrap;
width: 200px;
background: gray;
color: #fff;
}
.item1 {
flex: 1;
height: 30px;
background: blue;
}
.item2 {
flex: 1;
height: 50px;
background: red;
}
html:
<div class="box">
<div class="item1">
<div style="width: 120px;">1</div>
</div>
<div class="item2">
<div style="width: 120px;">2</div>
</div>
</div>
图片:
flex有版本兼容,需要根据浏览器的版本做兼容
.flex-hw {
}