绝对定位法三栏布局自适应
2012-09-30 09:47
197 查看
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>绝对定位法</title>
<style>
.parent{
margin:auto;
background:#09F;
position:relative;
}
.left{
width:200px;
height:200px;
background:#369;
position:absolute;
left:0;
top:0;
}
.right{
width:250px;
height:200px;
background:#C0C;
position:absolute;
right:0;
top:0;
}
.center{
background:#F00;
margin:0 250px 0 200px;
height:200px;
}
</style>
</head>
<body>
<div class="parent">
<div class="center"></div>
<div class="left"></div>
<div class="right"></div>
</div>
</body>
</html>
博客已经迁移到:http://sanjh.cn,欢迎围观
<html>
<head>
<meta charset="utf-8">
<title>绝对定位法</title>
<style>
.parent{
margin:auto;
background:#09F;
position:relative;
}
.left{
width:200px;
height:200px;
background:#369;
position:absolute;
left:0;
top:0;
}
.right{
width:250px;
height:200px;
background:#C0C;
position:absolute;
right:0;
top:0;
}
.center{
background:#F00;
margin:0 250px 0 200px;
height:200px;
}
</style>
</head>
<body>
<div class="parent">
<div class="center"></div>
<div class="left"></div>
<div class="right"></div>
</div>
</body>
</html>
博客已经迁移到:http://sanjh.cn,欢迎围观
相关文章推荐
- 利用绝对定位实现两列右边固定宽度左边自适应布局
- Javascript 瀑布流实现的两种方式:固定列数的浮动布局与绝对定位自适应宽度
- 绝对定位实现左右上下自适应布局
- VS2008下设置绝对定位的布局方式
- PyQt5:布局管理器:绝对定位方式(11)
- idv+css横向布局绝对定位
- DIV CSS布局中绝对定位和浮动用法
- 控件默认布局为绝对定位设置
- IE6下绝对定位的高度自适应
- 网页布局:html+css_绝对定位与相对定位
- 【CSS布局.2】绝对定位和相对定位
- css 绝对定位整页布局演示
- 慕课网学习笔记----《网页布局基础》—绝对定位布局
- CSS分栏布局的方法:绝对定位和浮动
- CSS教程:相对、绝对定位及布局和浮动
- 移动端web开发之坑--自适应布局下的返回页面位置定位问题
- 关于css样式 自适应和绝对定位 的一点理解
- 绝对定位布局代码
- css布局:父元素相对定位,子元素绝对定位
- Div+CSS教程----DivCSS布局绝对定位和浮动