<!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>
<title>浮动层</title>
<style type="text/css">
*{margin:0;padding:0;}
body{
_background-attachment:fixed;
_background-image:url(nothing);
}
#status-box{
width:100px;
height:100px;
color:#FFF;
background-color:black;
position:fixed;
_position:absolute;
bottom:0;
_top:expression(documentElement.scrollTop+document.documentElement.clientHeight-100);
right:0;
}
#cs{background-color:#ccc;width:200px;height:120px;position:absolute;left:100px;top:100px;}
</style>
</head>
<body>asdfasdfasd
<div id="cs">asdfasdf</div>
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<div id="status-box">静态层</div>
</body>
</html>
固定层
最新推荐文章于 2024-08-05 17:22:58 发布