兼容各个浏览器高度100%填充,IE6等div 100%高度填满解决办法 2011-07-28 22:01:36| 分类: HTML/CSS | 标签: |字号大中小 订阅 .
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en"><head><title>兼容各个浏览器高度100%填充,IE6等div 100%高度填满解决办法</title>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312">
<style type="text/css">
* {
padding: 0;
margin: 0;
}
h1{ font-size:14px; color:#cccccc}
body{background:#125a8b}
#container{ width:960px; margin:0 auto; background:#fff }
#container p{ text-align:center; color:#125a8b ; font:50px/100px "微软雅黑"; padding-top:200px; font-weight:bold}
/* 加以下代码 */
html, body {height: 100%;}
#container {min-height: 100%;}
* html #container {height: 100%;}
</style>
</head>
<body>
<div id="container">
<h1>兼容各个浏览器高度100%填充,IE6等div 100%高度填满解决办法.蜗客<strong><a href="http://www.workcss.com/" target="_blank">div+css网页制作</a></strong></h1>
<p>TEST</p>
</div>
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余1页未读,立即下载