<p class="sycode"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <br /> <html xmlns="http://www.w3.org/1999/xhtml"> <br> <br> </p> <title>CSS jquery实现Div底部固定</title> <br> <META http-equiv=Content-Type content="text/html; charset=GBK"> <br> <STYLE type=text/css> <br> *{margin: 0;padding: 0;font:14px "微软雅黑";} <br> .fixed{RIGHT: 15px;BACKGROUND: lightgreen;LEFT: 15px;BOTTOM: 0;LINE-Height: 30px;POSITION: fixed ;HEIGHT: 30px} <br> #iefixed{MARGIN: -1px 15px 0px;OVERFLOW: hidden;ZOOM: 1;HEIGHT: 1px} <br> </STYLE> <br> <!--[IE 7 の場合]> <br> <style type="text/css"> <br> .fixed { <br> 位置: 絶対; <br>下:自動。 <br> クリア: 両方。 <br>幅:expression(document.getElementById('iefixed').clientWidth); <br> 左:expression(document.getElementById('iefixed').offsetLeft); <br> トップ:expression(eval(document.compatMode && document.compatMode=='CSS1Compat') ? documentElement.scrollTop + <br> <br> <br> (documentElement.clientHeight-this.clientHeight) : document.body.scrollTop +(document.body.clientHeight) -this.clientHeight));} <br> </style> <br> <script type="text/javascript"> <br> function _fixBackground() { <br> var body = document.body; <br> var BLANK_GIF; <br> if (body.currentStyle.backgroundAttachment != "fixed") { <br> if (body.currentStyle.backgroundImage == "none") { <br> body.runtimeStyle.backgroundImage = "url(" + BLANK_GIF + ")"; // ダミー <br> body.runtimeStyle.backgroundAttachment = "fixed"; <br> } <br> } <br> } <br> window.onload = function() { <br> _fixBackground(); <br> } <br> </script> <br> <![endif]--> <br> </HEAD> <br> <br>请看网页底部 <br> <div><A href="http://www.999jiijiu.com/"> http://www.999jiujiu.com/</A></div> <br> <!--[IE 7 の場合]><div id="iefixed"></div><![endif]--> <br> <div style="width:960px;height:2000px;margin:0 auto"></div> <br> <DIV class=fixed>底部固定表示内容</DIV> <br> </BODY> <br> </HTML>