CSS Hacks, Firefox 3.5 and Google Chrome

前端 未结 4 2001
不思量自难忘°
不思量自难忘° 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:16

    @media screen and (-webkit-min-device-pixel-ratio:0) { ... styles go here ... }

    There is no CSS for only Chrome (AFAIK) but Chrome AND Safari. You may consider a Javascript solution.

    UPDATE Jan 22, 2013: As mentioned in the comments, this may no longer be safe. I could not find a suitable alternative.

提交回复
热议问题