各内核浏览器css hack

首页电脑网络各内核浏览器css hack(2012年04月29日)

现在浏览器越来越多,为了兼容各个版本和各种内核的浏览器,有的时候需要CSS hack的哦。这里收藏一个以备不时之需。

/* IE系列的专用hack使用时请注意顺序可能会有影响 */
    .hack { background: #ff0\9; } /*IE*/
    .hack { background: #f0f\0; } /*IE89*/
    .hack { background: #f00\0/; } /*IE8*/
    .hack { +background: #0f0; } /*IE67*/
    .hack { _background: #00f; } /*IE6*/
    @media all and (-webkit-min-device-pixel-ratio:10000), not all and (-webkit-min-device-pixel-ratio:0) { head~body .hack { background: #ccc; } } /*Opera*/
    @media screen and (-webkit-min-device-pixel-ratio:0) { .hack { background: #f60; display: block; } } /* Webkit */
    @-moz-document url-prefix() { .hack { background: #fff; } } /* Firefox */

添加新评论 »

You must enable javascript to see captcha here!