.banner {
height: 0;
overflow: hidden;
padding-bottom: 25.4%;
&__img {
width: 100%;
}
}
有前提的啊,前提就是 25.4%是你自己算出来的宽比,当然你看图片都是100%的。
本文来自博客园,作者:咸瑜,转载请注明原文链接:javascript:void(0)p/16180721.html
微信扫一扫
.banner {
height: 0;
overflow: hidden;
padding-bottom: 25.4%;
&__img {
width: 100%;
}
}
有前提的啊,前提就是 25.4%是你自己算出来的宽比,当然你看图片都是100%的。
本文来自博客园,作者:咸瑜,转载请注明原文链接:javascript:void(0)p/16180721.html
相关推荐