前端设计吧 关注:91贴子:114
  • 3回复贴,共1

【ie6兼容问题】

只看楼主收藏回复

ie6 高度bug
font-size:1px要重新定义字体大小 。
因为不定义的话,系统默认好像是9pt,所以会把div撑开成9pt大小的空间。
曾经纠结了我好久啊- -.... 高度明明只有1px 在ie6下显示一直偏高


1楼2014-12-03 15:59回复
    ie6下常常会出现双边距的问题
    可以加个{display:inline;}试试


    2楼2014-12-03 16:00
    回复
      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下写法
      /* 先修正IE6振动bug */
      * html,* html body {background-image:url(about:blank);background-attachment:fixed;}
      /* IE6 头部固定 */
      * html .fixed-top{position:absolute;bottom:auto;top:expression(eval(document.documentElement.scrollTop));}
      /* IE6 底部固定 */
      * html .fixed-bottom {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)));}
      /* IE6 左侧固定 */
      * html .fixed-left {position:absolute;right:auto;left:expression(eval(document.documentElement.scrollLeft));}
      /* IE6 右侧固定 */
      * html .fixed-right {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));}


      4楼2014-12-03 16:07
      回复
        关于ie6/7中span右浮动折行问题
        可以使用绝对定位(position:absolute)模拟右浮动(float:right)


        5楼2014-12-03 16:08
        回复