CSS Hacks, Firefox 3.5 and Google Chrome

前端 未结 4 2017
不思量自难忘°
不思量自难忘° 2020-12-28 23:23

I searched around and allegedly, body:nth-of-type(1) is used in CSS to target only Safari and Google Chrome.

Lo and behold, Mozilla reads it properly to

4条回答
  •  无人及你
    2020-12-29 00:22

    The @supports feature detection works for Chrome 28 and newer now.

    /* Chrome 28+ */
    
    @supports (-webkit-appearance:none) { .selector { color:red; } }
    

    I posted this to browserhacks - so either test it at browserhacks.com or my live personal css hacks test site at http://browserstrangeness.bitbucket.org/css_hacks.html#chrome.

    There are many others there that I have worked out for specific newer versions as well. I hope you enjoy them.

提交回复
热议问题