zoukankan      html  css  js  c++  java
  • CSS hack——不同浏览器的CSS应对法

    1、IE条件注释法:

      lte表示“小于等于”,“lt”表示“小于”,“gte”表示“大于等于”,“gt”表示“大于”,“!”表示“不等于”。

    <!--[if IE 6]>
        <link type="text/CSS" href="ie6.css" rel="stylesheet" />
    <![endif]-->
    <!--[if gt IE 7]>
        <link type="text/CSS" href="ie7.css" rel="stylesheet" />
    <![endif]-->
    

    2、选择符前缀法:

    <style type="text/CSS">
        .test{width:80px;}        /*IE 6,IE 7,IE 8*/
        *html .test{width:60px;}     /*only for IE 6*/
        *+html .test{width:70px;}      /*only for IE 7*/
    </style>

    3、样式属性前缀法:

    “_”只在IE6下生效,“*”在IE6和IE7下生效

    <style type="text/CSS">
        .test{width:80px;*width:70px;_width:60px;}
    </style>
  • 相关阅读:
    第三次作业
    第二次作业
    第一次作业
    第五次作业
    第四次作业
    第三次作业
    第二次作业
    随笔
    第五次作业
    第四次作业
  • 原文地址:https://www.cnblogs.com/lhl98/p/3429894.html
Copyright © 2011-2022 走看看