窗口居中,自适应高度
来源:互联网 发布:手机淘宝店招图片尺寸 编辑:程序博客网 时间:2024/06/06 13:00
css:
body {
position:absolute;
top:0;
left:0;
right:0;
bottom:0;
margin:0 auto;
}
.outer {
min-width: 1920px;
width: 100%;
height: 100%;
background-color: chartreuse;
}
.max {
width:1920px;
height:100%;
margin: 0 auto;
background-color:blueviolet;
position:relative;
}
.top {
height: 100px;
background-color: red;
}
.left {
width: 300px;
position:absolute;
background-color: blue;
margin-top: 10px;
float: left;
bottom:160px;
top:100px;
}
.menu {
height: 50px;
width: 1610px;
background-color: orange;
position:absolute;
right:0;
margin-top:10px;
}
.main {
width: 1610px;
margin-top: 10px;
margin-left: 20px;
background-color: brown;
position:absolute;
right:0;
top:160px;
bottom:160px;
overflow:auto;
}
.footer {
height: 150px;
width: 1920px;
background-color: aqua;
margin-top: 620px;
position:absolute;
bottom:0;
}
html:
<body>
<div class="outer">
<div class="max">
<div class="top"></div>
<div class="left"></div>
<div class="menu"></div>
<div class="main">
<h1>你是个猪你是个猪你是个猪你是个猪你是个猪你是个猪你是个猪你是个猪你是个猪你是个猪你是个猪你是个猪你是个猪你是个猪你是个猪你是个猪你是个猪你是个猪你是个猪你是个猪你是个猪你是个猪</h1>
<h1>你是个猪</h1>
<h1>你是个猪</h1>
<h1>你是个猪</h1>
<h1>你是个猪</h1>
<h1>你是个猪</h1>
<h1>你是个猪</h1>
<h1>你是个猪</h1>
<h1>你是个猪</h1>
<h1>你是个猪</h1>
<h1>你是个猪</h1>
<h1>你是个猪</h1>
<h1>你是个猪</h1>
<h1>你是个猪</h1>
<h1>你是个猪</h1>
<h1>你是个猪</h1>
<h1>你是个猪</h1>
<h1>你是个猪</h1>
<h1>你是个猪</h1>
<h1>你是个猪</h1>
<h1>你是个猪</h1>
<h1>你是个猪</h1>
<h1>你是个猪</h1>
<h1>你是个猪</h1>
<h1>你是个猪</h1>
<h1>你是个猪</h1>
<h1>你是个猪</h1>
</div>
<div class="footer"></div>
</div>
</div>
</body>
- 窗口居中,自适应高度
- DIV高度自适应窗口
- IFRAME完全自适应窗口高度
- table高度自适应浏览器窗口
- 设置父窗口框架高度自适应
- Html iframe 窗口自适应内容高度
- 如何让iframe的高度自适应父窗口的高度
- 让div高度跟随窗口高度自适应的方法
- 典型的三行二列居中高度自适应布局
- 典型的三行二列居中高度自适应布局
- 典型的三行二列居中高度自适应布局
- 典型的三行二列居中高度自适应布局
- 典型的三行二列居中高度自适应布局
- 典型的三行二列居中高度自适应布局
- 典型的三行二列居中高度自适应布局
- DIV+CSS 三行二列居中高度自适应布局
- 典型的三行二列居中高度自适应布局
- 典型的三行二列居中高度自适应布局
- 【转】ABAP的坑3
- HUD 1166 敌兵布阵 (线段树, 单点修改)
- dpdk编译遇到了问题1
- http和https的区别
- 手游精品化的第三年,谁在窃取手游开发者的利益?
- 窗口居中,自适应高度
- css中!important的作用
- Java NIO(Non-blocking IO)
- Arduino
- RE:JAVA学习-线程及线程池操作
- poj 1308 Is It A Tree? (并查集)
- Gradle构建之Groovy语言基础
- idea中搭建基于maven的ssm整合框架
- 程序只运行一个实例