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; }