Different CSS files for Different Browsers

前端 未结 10 994
情深已故
情深已故 2020-12-17 07:48

I want to use different CSS files for different browser types. Is there any simple HTML code which can detect different types of browsers and include CSS files accordingly?<

10条回答
  •  执念已碎
    2020-12-17 08:12

    It is usually easier to use 'hacks' within the same stylesheet.

    This is not to condone their use (as I don't want to be modded down by evangelists :))

    http://www.webmonkey.com/tutorial/Browser-Specific_CSS_Hacks

    http://www.dynamicsitesolutions.com/css/filters/support-chart/

    http://ajaxian.com/archives/css-browser-hacks

    http://www.456bereastreet.com/archive/200411/the_underscore_hack/

    For the different IE versions (usually the most important) there is a conditional IE 'if' which can handle lots of parameters: http://www.quirksmode.org/css/condcom.html

提交回复
热议问题