使用padding和float处理带有间隙的多块布局

每个间隙都是20px

                                 <div class="action-content pd10" style="">
                                    <div class="pd10" style="height: 100%;width: 50%;float: left;box-sizing: border-box;">
                                        <div style="border:1px dashed indigo;height: 100%;width: 100%;"></div>
                                    </div>
                                    <div class="pd10" style="height: 30%;width: 50%;float: left;box-sizing: border-box;">
                                        <div style="border:1px dashed indigo;height: 100%;width: 100%;"></div>
                                    </div>
                                    <div class="pd10" style="height: 70%;width: 50%;float: left;box-sizing: border-box;">
                                        <div style="border:1px dashed indigo;height: 100%;width: 100%;"></div>
                                    </div>
                                </div>

pd10 对应padding:10px;

相关文章:

  • 2021-12-05
  • 2021-11-21
  • 2021-11-29
  • 2021-11-29
  • 2022-12-23
  • 2021-08-27
  • 2021-10-27
  • 2021-12-15
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-11
  • 2021-06-09
  • 2022-12-23
  • 2021-12-18
  • 2021-12-06
相关资源
相似解决方案