zoukankan      html  css  js  c++  java
  • ie下web常见错误和差异及解决方案

    区分ie6~8

             IE6   IE7    IE8   FF2   FF3    Opera9.5 
    >property    Y——     Y——     Y——     N——     N——     N         ??  貌似无效
    .property    Y——     Y——     Y——     N——     N——     N         ??  …………
    value9     Y—— Y—— Y—— N—— N—— N  
    *property    Y——  Y——  N——  N——  N——  N
    _property    Y——  N——  N——  N——  N——  N
    !important    N——  Y——  Y——  Y——  Y——  Y

    html条件注释区分ie各种浏览器(除IE外所有浏览器无法识别,全部转换成注释)

    <!--[if lte IE 6]>
    html code
    <![endif]–> 

    ie6不支持 A > B 子选择器

    $('.searchtext1').on({
      focus: function () {xx},
      blur: function () {xx}  //ie6此处不能有逗号
    })

    ie6 js无法解析trim()方法

    增加一段js代码

    String.prototype.trim = function () {
      return this.replace(/^ss*/, '' ).replace(/ss*$/, '' );
    }

    解决ie6,ie7不支持display:inline-block;

    增加样式 *display:inline; *zoom:1;

    IE ,ff,chrome 下input光标向上偏离

    可以用 9 方法来解决: ie下input line-height要设置数值。chrome下line-height:normal;

  • 相关阅读:
    原生js螺旋运动
    拉美电子游戏市场创收45亿美元
    ZOJ 3229 Shoot the Bullet
    Java的压缩、解压及压缩加密、解密解压 样例
    java环境变量配置
    git在myelispse中的安装
    java注解
    Python测试框架doctest
    python中的协程
    Flask log配置,实现按照日期自动生成日志文件
  • 原文地址:https://www.cnblogs.com/ericyuan/p/4103052.html
Copyright © 2011-2022 走看看