What is better: CSS hacks or browser detection?

后端 未结 15 1724
感情败类
感情败类 2020-12-12 15:28

Commonly when I look around the Internet, I find that people are generally using CSS hacks to make their website look the same in all browsers. Personally, I have found this

15条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-12 16:15

    Well hacks are quicker for the browser, but browser detection gives better readablity in your CSS if you structure it right. If you can make browser detection and at the same time can share the CSS between the browsers, and only have the different css in seperate files or whatever, then I would use browser detection - as this is something a newbie can understand, where CSS hacks is hard to understand if you don't know them

提交回复
热议问题