让position:fixed在IE6下可用!

模板网 2014-09-13
/*让position:fixed在IE6下可用!*/
.fixed-top/*头部固定*/{position:fixed;bottom:auto;top:0px;}
.fixed-bottom/*底部固定*/{position:fixed;bottom:0px;top:auto;}
.fixed-left/*左侧固定*/{position:fixed;right:auto;left:0px;}
.fixed-right/*右侧固定*/{position:fixed;right:0px;left:auto;}
/*上面的是除了IE6的主流浏览器通用的方法*/
*html,*htmlbody/*修正IE6振动bug*/{background-image:url(about:blank);background-attachment:fixed;}
*html.fixed-top/*IE6头部固定*/{position:absolute;bottom:auto;top:expression(eval(document.documentElement.scrollTop));}
*html.fixed-right/*IE6右侧固定*/{position:absolute;right:auto;left:expression(eval(document.documentElement.scrollLeft+document.documentElement.clientWidth-this.offsetWidth)-(parseInt(this.currentStyle.marginLeft,10)||0)-(parseInt(this.currentStyle.marginRight,10)||0));}
*html.fixed-bottom/*IE6底部固定*/{position:absolute;bottom:auto;top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0)));}
*html.fixed-left/*IE6左侧固定*/{position:absolute;right:auto;left:expression(eval(document.documentElement.scrollLeft));} 

相关文章

  1. JS滚动bxslider的使用

    1. 详细Demo: http://www.bxslider.com/examples 2、如何使用 在实际中如下引用: script type=text/javascript src=js/jquery.js/script script type=text/javascript src=js/jquery.bxslider.js/script bxslider无缝滚动 script type=text/javascript $(f

  2. Zepto.js手机页面上替代jQuery的最佳Javascript库

    Zepto.js手机页面上替代jQuery的最佳Javascript库,Zepto是现代的浏览器最大程度上与jQuery兼容的API,简约的JavaScript库 ,如果你使用jQuery,你已经知道如何使用的Zepto。 虽然100%的jQuery覆盖率不是一个设计目标, 提供的API相匹配的jQuery的同行 。

  3. html禁止手机页面放大缩小代码

    只需网页头部head标签内添加一下代码即可实现禁止手机页面放大缩

  4. 让position:fixed在IE6下可用!

    /*让position:fixed在IE6下可用!*/ .fixed-top/*头部固定*/{position:fixed;bottom:auto;top:0px;} .fixed-bottom/*底部固定*/{position:fixed;bottom:0px;top:auto;} .fixed-left/*左侧固定*/{position:fixed;right:auto;left:0px;} .fixed-right/*右侧固定

  5. 手机站上离线宝被UC浏览器屏蔽解决方案

    手机站上离线宝被UC浏览器屏蔽解决方案,在手机站上使用离线宝发现在UC浏览器中被屏蔽了。页面上会有很大一块空白,怎么办? 利用一下代码可以解决离线宝被屏蔽时,去除头部空白。 复制代码 代码如下: document.writeln(script type=\text/javascript\ src=\

随机推荐

  1. JS滚动bxslider的使用

    1. 详细Demo: http://www.bxslider.com/examples 2、如何使用 在实际中如下引用: script type=text/javascript src=js/jquery.js/script script type=text/javascript src=js/jquery.bxslider.js/script bxslider无缝滚动 script type=text/javascript $(f

  2. Zepto.js手机页面上替代jQuery的最佳Javascript库

    Zepto.js手机页面上替代jQuery的最佳Javascript库,Zepto是现代的浏览器最大程度上与jQuery兼容的API,简约的JavaScript库 ,如果你使用jQuery,你已经知道如何使用的Zepto。 虽然100%的jQuery覆盖率不是一个设计目标, 提供的API相匹配的jQuery的同行 。

  3. html禁止手机页面放大缩小代码

    只需网页头部head标签内添加一下代码即可实现禁止手机页面放大缩

  4. 让position:fixed在IE6下可用!

    /*让position:fixed在IE6下可用!*/ .fixed-top/*头部固定*/{position:fixed;bottom:auto;top:0px;} .fixed-bottom/*底部固定*/{position:fixed;bottom:0px;top:auto;} .fixed-left/*左侧固定*/{position:fixed;right:auto;left:0px;} .fixed-right/*右侧固定

  5. 手机站上离线宝被UC浏览器屏蔽解决方案

    手机站上离线宝被UC浏览器屏蔽解决方案,在手机站上使用离线宝发现在UC浏览器中被屏蔽了。页面上会有很大一块空白,怎么办? 利用一下代码可以解决离线宝被屏蔽时,去除头部空白。 复制代码 代码如下: document.writeln(script type=\text/javascript\ src=\