1.添加viewport标记 2.宽度高度使用百分比 .div1 { background-color: red; width: 48%; height: 0; padding-bottom: 40%; margin: 10px 1%; float: left; overflow: hidden; background-repeat: no-repeat; background-size: auto 100%; background-position: center; } 相关文章: 2021-11-26 2021-12-01 2022-01-02 2021-10-27 2021-06-15 2022-01-30 2021-11-21 2022-12-23