div固定在页面底部不随滚动条移动示例



<!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>
<style type="text/css">
body{margin:0px;padding:0px;}
#inbottom{position:fixed; bottom:0;left:0; width:100%; background:#666;}
</style>
<!--[if IE 6]>
<style type="text/css">
html{overflow:hidden;}
body{height:100%;overflow:auto;}
#inbottom{position:absolute;}
</style>
<![endif]-->
</head>
<body>
<div style="height:2000px;background:#ccc;"></div>
<div id="inbottom">固定底部不动</div>
</body>
</html>


评论: 0 | 引用: 0 | 查看次数: 8456
发表评论
登录后再发表评论!