下面是两种布局方式

html

<div class="t1">
       <div class="one">1</div>
       <div class="two">2</div>
</div>

css1样式布局1

.one{
  float:left;
  width:300px;
  height:200px;
  background-color: pink;
}
.two{
  margin-left: 300px;
  height:200px;
  background-color: #f40;
}

css2样式布局2

.one{
       position:absolute;
       width:300px;
       height:200px;
       background-color: pink;
}
.two{
       margin-left: 300px;
       height:200px;
       background-color: #f40;
}

 

相关文章:

  • 2022-12-23
  • 2022-02-09
  • 2022-12-23
  • 2022-03-06
  • 2022-02-09
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-09
  • 2022-02-09
  • 2021-07-21
  • 2021-08-30
相关资源
相似解决方案