现在的位置: 首页 > 综合 > 正文

div 永远在页面底部

2018年04月09日 ⁄ 综合 ⁄ 共 587字 ⁄ 字号 评论关闭
<!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=gb2312" />
<title>div居底</title>
<style type="text/css">#bom {
    position:fixed;
    left:0px;
    bottom:0;
    _position:absolute;
    _top:expression(document.documentElement.clientHeight + document.documentElement.scrollTop - this.offsetHeight);
}</style>
</head>
<body>div居底
<div style="height:1000px;"></div>
<div id="bom"><img src="http://www.baidu.com/img/logo-yy.gif" alt="test" /></div>
</body>
</html>

 

抱歉!评论已关闭.