HTML在页面滚动时顶部不动。
<!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">
body, html
{
width:100%;
height:100%;
}
*
{
margin:0px; padding:0px;
}
body
{
font-size:14px;
line-height:1.5;
font-family:Consolas Tahoma Verdana;
}
</style>
</head>
<body>
<div id="divTop" style="background-color:#eee; border-bottom:solid 1px gray; line-height:30px; position:fixed; top:0px; 100%; z-index:1;">
顶部内容
</div>
<div style="height:2000px; position:relative; top:30px; _top:0px;">sssssssssss</div>
</body>
</html>