Chinaunix首页 | 论坛 | 博客
  • 博客访问: 459196
  • 博文数量: 226
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 2111
  • 用 户 组: 普通用户
  • 注册时间: 2014-06-20 09:02
个人简介

web web web

文章分类

全部博文(226)

文章存档

2020年(2)

2019年(1)

2018年(3)

2017年(26)

2016年(57)

2015年(60)

2014年(77)

我的朋友

分类: Html/Css

2015-06-09 15:24:29

两栏布局:
#left {
    width: 200px;
    background-color: green;
    float: left;
}
#content {
    background-color: orange;
    margin-left: 200px;
}

<div id="left">Left sidebar</div>
<div id="content">Main Content</div>


三栏布局:
1.绝对定位
   .left{
       position:absolute;
       left:0;
       width:200px;
  }
  .right{
      position:absolute;
      right:0;
      width:200px;
}
.maincontent{
    margin-left:200px;
    margin-right:200px;
}
11

33

22


2.自身浮动法
   .left{
        float:left;
        width:200px;
   }
   .right{
        float:right;
        width:200px;
   }

11

33

22
阅读(719) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~