翊枫
撸码才能成长,学会深究,懂得填坑
下面是两种布局方式

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

 

posted on 2017-09-05 10:45  翊枫  阅读(140)  评论(0编辑  收藏  举报

Stick to the code and become the code God.