zoukankan      html  css  js  c++  java
  • ie6下absolute:fixed问题,完美兼容

    普通css代码

    .fix_foot{height: 30px; background: #ff0000; position: fixed; bottom: 0px;  100%; z-index:10;}

    ie6兼容代码

    * html,* html body{background-image:url(about:blank);background-attachment:fixed}
    * html .fix_foot{position:absolute;left:expression(eval(document.documentElement.scrollLeft));top:expression(eval(document.documentElement.scrollTop))}
    * html .fix_foot{position:absolute;left:expression(eval(document.documentElement.scrollLeft+document.documentElement.clientWidth-this.offsetWidth)-(parseInt(this.currentStyle.marginLeft,10)||0)-(parseInt(this.currentStyle.marginRight,10)||0));top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0)))}

    用的时候直接这样放:(而且不会出现抖动)

    .fix_foot{height: 30px; background: #ff0000; position: fixed; bottom: 0px;  100%; z-index:10;}
    /*IE6兼容*/
    * html,* html body{background-image:url(about:blank);background-attachment:fixed}
    * html .fix_foot{position:absolute;left:expression(eval(document.documentElement.scrollLeft));top:expression(eval(document.documentElement.scrollTop))}
    * html .fix_foot{position:absolute;left:expression(eval(document.documentElement.scrollLeft+document.documentElement.clientWidth-this.offsetWidth)-(parseInt(this.currentStyle.marginLeft,10)||0)-(parseInt(this.currentStyle.marginRight,10)||0));top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0)))}
  • 相关阅读:
    Jqgrid 属性描述
    Log4Net 配置独立文件
    jqgrid中 colModel
    jqgrid jsonReader
    sql 分割字符串
    网页默认浏览器以IE那个版本查看
    objectc基础:property,assign,copy,retain,release
    Sending 'ccColor4B' (aka 'struct_ccColor4B') to parameter of incompatible type 'CIColor *'
    CCAnimate 和 CCAnimation
    什么时候用removeUnusedSpriteFrames和removeUnusedTextures
  • 原文地址:https://www.cnblogs.com/wesky/p/3303481.html
Copyright © 2011-2022 走看看