zoukankan      html  css  js  c++  java
  • 浏览器兼容

    1、

    可以先使用“9"标记,将IE分离出来,再用”*"分离出IE6/IE7,最后可以用“_”分离出IE6

    .type{
    color: #111; /* all */

    color: #2229; /* IE */

    *color: #333; /* IE6/IE7 */
    _color: #444; /* IE6 */
    }
    一般来说,只有IE6不支持 !important
    所以可以这样
    #example{
    100px !important; /* IE7 FF */
    110px; /* IE6 */

    因为!important 具有最高优先级,所以此种方式可以区别出来~

    -------------------------------------------------------------------------------------------------

    2、

    H5兼容低版本浏览器:
    1、
    <!DOCTYPE html>后加:
    <!--[if lt IE 7]> <html lang="en" class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
    <!--[if IE 7]> <html lang="en" class="no-js lt-ie9 lt-ie8"> <![endif]-->
    <!--[if IE 8]> <html lang="en" class="no-js lt-ie9"> <![endif]-->
    <!--[if gt IE 8]><!--> <html lang="en" class="no-js"> <!--<![endif]-->

    2、引入Modernizr的JS文件

    3、min-height问题:

    如果我们要设置一个标签的最小高度200px,需要进行的设置为:{min-height:200px; height:auto !important; height:200px; overflow:visible;}

    4、i的点击事件只有iphone支持,要换成span.

  • 相关阅读:
    POJ 2112 Optimal Milking (Floyd+二分+最大流)
    hdu5444 Elven Postman
    hdu5442 Favorite Donut
    hdu5437 Alisha’s Party
    hdu5433 Xiao Ming climbing
    hdu5432 Pyramid Split
    Codeforces Round #316 (Div. 2) C. Replacement
    hdu5396 Expression
    hdu3506 Monkey Party
    hdu3516 Tree Construction
  • 原文地址:https://www.cnblogs.com/lily2015/p/4661410.html
Copyright © 2011-2022 走看看