首页 > 为了兼容安卓4.3使用旧版的flex布局子元素超出父元素不支持收缩,如何解决

为了兼容安卓4.3使用旧版的flex布局子元素超出父元素不支持收缩,如何解决

.box{
    width: 500px;
    height: 100px;
    display: -webkit-box;
    border:1px solid red;
}

.a{
    background-color: skyblue;
    width: 600px;
}

.b{
    -webkit-box-flex:1;
    background-color: gray;
}
////HTML
<div class="box">
    <div class="a">超出了不能够收缩</div>
    <div class="b">xhay</div>
</div>

兼容的不够,推荐使用autoprefixer编译一下

参考:http://www.zhihu.com/question/25147729

【热门文章】
【热门文章】