首页 > 技术文章 > 使用css 设置高度等于宽度
itadong 2017-06-28 16:02 原文
在工作中遇见一个问题
宽度不一定,但是想让box为正方形;
比如width:50%;之后设置该box为正方形设置height:0;padding-bottom:100%;