让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. 4种动态加载JS的方法

    要实现动态加载JS脚本有4种方法: 1、直接document.write 复制代码 代码如下: script language=javascript document.write(script src=test.js\/script); /script 2、动态改变已有script的src属性 复制代码 代码如下: script src= id=s1/script script langu

  2. 获取QQ信息的几个接口

    可能有的朋友们早就在空间抓到了这些接口,不会的一定要自己抓包啊,IE9版本以前的可以用httpwatch,IE9自带抓包软件(快捷键F12) 本论坛已经发布了登陆空间源代码,其中含有g_tk的计算,关于登陆的不用多说。 在VB中首先登陆一个QQ,计算得到g_tk,然后用G

  3. 假503错误页面,伪装503错误,503.js代码下载

    在一些特殊情况下,我们需要将我们的网站展现给访客看时是打不开的状态,但是并不希望关闭网站,因为直接关站,会影响搜索引擎的收录。 那么利用下面提供的代码就可以轻松实现这种需求。 代码打包下载: 503.js代码下载 压缩包中主要文件: 503.html 复制代

  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. a标签点击过后出现虚线的解决方法

    问题:a标签点击过后出现虚线 解决方法:a{blr:expression(this.onFocus=this.blur());outline: none;}

随机推荐

  1. 4种动态加载JS的方法

    要实现动态加载JS脚本有4种方法: 1、直接document.write 复制代码 代码如下: script language=javascript document.write(script src=test.js\/script); /script 2、动态改变已有script的src属性 复制代码 代码如下: script src= id=s1/script script langu

  2. 获取QQ信息的几个接口

    可能有的朋友们早就在空间抓到了这些接口,不会的一定要自己抓包啊,IE9版本以前的可以用httpwatch,IE9自带抓包软件(快捷键F12) 本论坛已经发布了登陆空间源代码,其中含有g_tk的计算,关于登陆的不用多说。 在VB中首先登陆一个QQ,计算得到g_tk,然后用G

  3. 假503错误页面,伪装503错误,503.js代码下载

    在一些特殊情况下,我们需要将我们的网站展现给访客看时是打不开的状态,但是并不希望关闭网站,因为直接关站,会影响搜索引擎的收录。 那么利用下面提供的代码就可以轻松实现这种需求。 代码打包下载: 503.js代码下载 压缩包中主要文件: 503.html 复制代

  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. a标签点击过后出现虚线的解决方法

    问题:a标签点击过后出现虚线 解决方法:a{blr:expression(this.onFocus=this.blur());outline: none;}