m110

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
猜你喜欢
  • 2021-06-22
  • 2021-11-28
  • 2021-12-31
  • 2021-09-21
  • 2021-08-01
  • 2021-11-30
  • 2021-12-17
相关资源
相似解决方案