1. 程式人生 > >瀏覽器兼容性

瀏覽器兼容性

arc ack -- 踩坑 選擇器 window7 range res respond

IE8+實現css3媒體選擇方案

  IE6-IE8 css3媒體選擇 (min/max-width)的polyfill respond.js respond.js用法踩坑

  css3-mediaqueries.js

html5shiv

html hack 條件註釋 less-than、less-than equal、 greater-than(註意格式的要求比較嚴格)

    <!--[if lt IE 9]>

      IE8及以下的瀏覽器會顯示

    <![endif]-->

css hack 原理高級瀏覽器不識別不認識的css屬性,也不報錯

  css屬性hack(window7 IE瀏覽器親測有效(IE6未測試))

    /*IE10-(不包括Edge)*/
    color: green\9;

    /*IE8+(包括Edge)*/
    color: purple\0;
    color: #999\0/;

    /*IE7-*/
    !color: pink;

    /*IE6-*/
    _color: orange;

  css選擇器hack

/*IE7*/
html>body .test,{
    color: #00f;
    font-size: 48px;
}

/*IE7-IE6*/
.test,
{ color: #0f0; font-size: 48px; } /*IE6-*/ * html .test{ color: #f00; font-size: 48px; }

  

瀏覽器兼容性