Specific stylesheet for IE8

萝らか妹 提交于 2019-12-10 12:59:57

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!