zoukankan      html  css  js  c++  java
  • css hack的使用

    补充:
    color{
     background-color: #CC00FF;  /*所有浏览器都会显示为紫色*/
     background-color: #FF0000\9; /*IE6、IE7、IE8会显示红色*/
     *background-color: #0066FF;  /*IE6、IE7会变为蓝色*/  
     _background-color: #009933;  /*IE6会变为绿色*/
    }
    好多css hack,最重要的是简单实用能解决问题就行了
    总结:
    \9: IE6 IE7 IE8
    *: IE6 IE7
    _: IE6
    *+: IE7
    ----------------------------------------
    IE6,IE7,Firefox兼容的css hack
    第一种办法:
    body
    {
        background:red;
        *background:blue !important;  
        *background: green;
    }

    第一排给Firefox以及其他浏览器看;
    第二排给IE7,IE7既能能识别*号,也能识别important;
    第三排给IE6也能识别*号;
    第二种办法,使用_来区分IE6:

    body
    {
        background:red;
        *background:blue;  
        _background: green;
    }

    第一排给Firefox以及其他浏览器看;
    第二排给IE7,IE7既能能识别*号;
    第三排给IE6能识别下划线;

    好多css hack,最重要的是简单实用能解决问题就行了
    总结:
    \9: IE6 IE7 IE8
    *: IE6 IE7
    _: IE6
    *+: IE7
  • 相关阅读:
    Boolean()类型转换
    ECMAscript 变量作用域
    jQuery 添加样式属性的优先级别
    css类选择器类名覆盖优先级
    巡风扫描器安装-windows部署
    atom无法安装插件的解决方法之一
    网络爬虫url跳转代码
    查看天气的代码
    三级地名菜单
    购物清单代码
  • 原文地址:https://www.cnblogs.com/luhangnote/p/2690946.html
Copyright © 2011-2022 走看看