WEB开发网
开发学院网页设计DivCss 兼容ie6浏览器窗口四角固定背景代码 阅读

兼容ie6浏览器窗口四角固定背景代码

 2012-02-16 12:46:52 来源:WEB开发网   
核心提示:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xml
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <title>cncms.com-浏览器窗口四角固定背景代码</title>
 <style type="text/css">
 html{
     _overflow:hidden;/*for ie6*/
 }
 body {
     margin:0;
     padding:0;
     _height:100%;/*for ie6*/
     _overflow:auto;/*for ie6*/
 }
 .mainbox {
     position:relative;
     _position:inherit;/*for ie6*/
     margin:20px;
     display:block;
     height:2000px;
     background:#e2e2e2;
 }
 .topleft, .topright, .bottomleft, .bottomright {
     position:fixed;
     width:100px;
     height:100px;
     background-color:#990;
     _position:absolute;/*for ie6*/
     _z-index:-1;/*for ie6*/
 }
 .topleft {
     left:0;
     top:0;
 }
 .topright {
     right:0;
     top:0;
 }
 .bottomleft {
     left:0;
     bottom:0;
 }
 .bottomright {
     right:0;
     bottom:0;
 }
 </style>
 </head>
 <body>
 <div class="topleft"></div>
 <div class="topright"></div>
 <div class="bottomleft"></div>
 <div class="bottomright"></div>
 <div class="mainbox">这里是内容区域填充文字 - www.15597.com</div>
 </body>
 </html>

Tags:兼容 ie6 浏览器

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接