使用条件注释可以轻松地将Internet Explorer作为特定于浏览器的CSS规则的目标:
<!--[if IE 6]>
...include IE6-specific stylesheet here...
<![endif]-->
有时是Gecko引擎(Firefox)行为不正常.What would be best way to target only Firefox with your CSS rules and not a single other browser?也就是说,Internet Explorer不仅应该忽略仅限Firefox的规则,而且WebKit和Opera也应该忽略.
我在寻找一种"干净"的解决方案.在我看来,使用JavaScript浏览器嗅探器将"Firefox"类添加到我的HTML中并不算干净.我更希望看到一些依赖于浏览器功能的东西,就像条件注释对于IE…来说只是"特殊的"