前端实现正方形模块并且自适应

div{

  50%;

  height:0;

  margin-bottom:50%;//设置的是页面宽度的50%

}

原文地址:https://www.cnblogs.com/zj911005/p/9025625.html