How do I add a css line ONLY for Safari

后端 未结 7 1524
轮回少年
轮回少年 2020-12-28 11:03

I am making a website, but an element needs margin in Chrome and other browsers, but not in safari. So I want to add a css line to fix it, but I can\'t find any method to ad

7条回答
  •  天涯浪人
    2020-12-28 11:24

    There is a question similar to this on the CSS-Tricks forum. But the answer is basically, nope. You could attempt user-agent sniffing server side or with JavaScript and then add a class to the html (like for old IE versions in HTML5 BoilerPlate).

    Hope this helps.

    --beaten to it by the guys above and below!

提交回复
热议问题