<!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>浏览器窗口四角固定背景代码</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">这里是内容区域填充文字</div> </body> </html> 提示:您可以先修改部分代码再运行