实现底部固定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>


<TITLE>jquery博客实现底部固定类似人人校内似的</TITLE>


<meta name="keywords" content="底部固定,人人校内" >


<meta name="description" content="jQuery吧,Write Less, Do More,注重前端开发,web前端开发">


<META http-equiv=Content-Type content="text/html; charset=GBK">


<script src="datePicker/jquery.datepicker.js" type="text/javascript"></script>


<STYLE type=text/css>


*{margin:0;padding:0}


.fixed {/*RIGHT: 15px; BACKGROUND: #ccc; LEFT: 15px; BOTTOM: 0; LINE-HEIGHT: 30px; POSITION: fixed; HEIGHT: 30px*/
position:fixed; left:50%; width:938px; margin-left: -469px; bottom:0px; height:90px;border:1px solid #d1d1d1;background-color:#eeeeee;z-index:99;
}


#iefixed {


MARGIN: -1px 15px 0px; OVERFLOW: hidden; ZOOM: 1; HEIGHT: 1px


}


</STYLE>


<!--[if lt IE 7]>


<script type="text/javascript">


            function _fixBackground(){


var body = document.body;


var BLANK_GIF;


                if (body.currentStyle.backgroundAttachment != "fixed") {


                    if (body.currentStyle.backgroundImage == "none") {


                        body.runtimeStyle.backgroundImage = "url("+BLANK_GIF+")"; // dummy


body.runtimeStyle.backgroundAttachment = "fixed";


                    }


                }


            }


window.onload = function(){


_fixBackground();


}


        </script>


        <style type="text/css">


        .fixed{


            position: absolute;


    bottom: auto;


    clear: both;


    width:expression(document.getElementById('iefixed').clientWidth);


left:expression(document.getElementById('iefixed').offsetLeft);


    top:expression(eval(document.compatMode &&


        document.compatMode=='CSS1Compat') ?


        documentElement.scrollTop


        +(documentElement.clientHeight-this.clientHeight) 


        : document.body.scrollTop


        +(document.body.clientHeight-this.clientHeight));


}


        </style>


<![endif]-->


</HEAD>


<BODY>


<div style="margin:0 auto;text-align:center"><script type="text/javascript">                                                 /*DEMO728*90,创建于2012-5-15*/var cpro_id = 'u897038';</script><script src="http://cpro.baidu.com/cpro/ui/c.js" type="text/javascript"></script></div>


<div style="margin:0 auto;text-align:center"><script type="text/javascript">                                                 /*468*60,创建于2012-5-7*/var cpro_id = 'u883919';</script><script src="http://cpro.baidu.com/cpro/ui/c.js" type="text/javascript"></script></div>


<h1><a href="http://www.jqueryba.com/" target="_blank" title="jquery,jquery博客,jquery效果,前端开发,web前端,web前端开发,设计,前端资源,html+CSS,JavaScript,html5,css3,浏览器兼容">jQuery吧</a></h1>


<h2><a href="http://www.jqueryba.com/396.html" target="_blank">jquery博客实现底部固定类似人人校内似的</a></h2>










<!--[if lt IE 7]><div id="iefixed"></div><![endif]-->


<div style="width:960px;height:2000px;margin:0 auto"></div>


<DIV class=fixed>这里是position:fixed部分.我又不动啦




</DIV>






<div style="width:100%;height:600px;margin:0 auto"></div>


<script type="text/javascript">    /*DEOM120*270,创建于2012-5-12*/var cpro_id = 'u893319';</script><script src="http://cpro.baidu.com/cpro/ui/f.js" type="text/javascript"></script> <script type="text/javascript">                                                                                                                                                                                  /*DEMO728*15,创建于2012-5-15*/var cpro_id = 'u897027';</script><script src="http://cpro.baidu.com/cpro/ui/c.js" type="text/javascript"></script>


</BODY>


</HTML>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值