问题
How can I make a specific CSS stylesheet for Internet Explorer 8?
I mean, how can I load it only if the browser is IE8? (And not IE7 and IE6)
回答1:
use this
<!--[if IE 8]>
<link href="/stylesheets/iestyle8.css" rel="stylesheet" type="text/css" />
<![endif]-->
回答2:
<!--[if IE 8]>
<link href="ie8.css" rel="stylesheet" type="text/css" />
<![endif]-->
http://www.quirksmode.org/css/condcom.html
回答3:
You can use the following:
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="ie8.css" media="screen" />
<![endif]-->
来源:https://stackoverflow.com/questions/2794680/specific-stylesheet-for-ie8