Different CSS files for Different Browsers

前端 未结 10 938
情深已故
情深已故 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 07:53

    Conditional HTML comments works if you're trying to include CSS files specific to Internet Explorer. See this quirksmode article for more information.

    For other browsers, you'd have to either use JavaScript or server-side detect which browser the visitor is using, and depending on the result, include the suitable CSS file. Another great article on quirksmode about that here.

提交回复
热议问题