让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. 隐藏统计代码的LOGO文字

    网站上添加网站统计代码后,一些情况下会影响网站整体的美观性,我们可以通过以下代码来隐藏统计代码的LOGO或文字。 将各种统计代码放到以下div中即可: 复制代码 代码如下: !--统计代码开始-- div style=display:none; !--百度统计-- script type=text/java

  2. window.onerror()的详细用法

    window.onerror = function(sMessage,sUrl,sLine){}; onerror函数的三个参数用于确定错误确切的信息,代表的意思依次为:错误信息;发生错误的文件;发生错误的行号。 示例: 复制代码 代码如下: SCRIPT window.onerror=fnErrorTrap; function fnErrorTrap(s

  3. 仿站小工具 V6.0

    仿站小工具介绍: 仿站小工具是通过网址下载静态网页的工具。从输入的网址下载html代码,提取出JS、Css、Image、Picture、Flash等静态文件网址,再从下载完好的Css代码中提取出Image静态文件网址,通过网址下载静态文件,根据软件设置好的保存规则,自动修正

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

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

  5. 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

随机推荐

  1. 隐藏统计代码的LOGO文字

    网站上添加网站统计代码后,一些情况下会影响网站整体的美观性,我们可以通过以下代码来隐藏统计代码的LOGO或文字。 将各种统计代码放到以下div中即可: 复制代码 代码如下: !--统计代码开始-- div style=display:none; !--百度统计-- script type=text/java

  2. window.onerror()的详细用法

    window.onerror = function(sMessage,sUrl,sLine){}; onerror函数的三个参数用于确定错误确切的信息,代表的意思依次为:错误信息;发生错误的文件;发生错误的行号。 示例: 复制代码 代码如下: SCRIPT window.onerror=fnErrorTrap; function fnErrorTrap(s

  3. 仿站小工具 V6.0

    仿站小工具介绍: 仿站小工具是通过网址下载静态网页的工具。从输入的网址下载html代码,提取出JS、Css、Image、Picture、Flash等静态文件网址,再从下载完好的Css代码中提取出Image静态文件网址,通过网址下载静态文件,根据软件设置好的保存规则,自动修正

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

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

  5. 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