布局:高度和宽度都为百分比
Viewport units: vw, vh, vmin, vmax - CR Length units representing a percentage of the current viewport dimensions: width (vw), height (vh), the smaller of the two (vmin), or the larger of the two (vmax). 新写法 width:20vw; height:20vw;(感谢提醒) 兼容写法 [data-type=”ImageList”] { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: flex-start; width:100%; text-align: center; position: relative; line-height: 1; > div { width:32%; position:relative; height:0; font-size:0; line-height:0; padding:0 0 20%; > div { width:100%; height:100%; position: absolute; top:0; left:0; } } } 参考资料: http://caniuse.com/#search=vw https://www.zhihu.com/question/31753528
布局:高度和宽度都为百分比
http://example.com/2017-10-18 布局:高度和宽度都为百分比/