是否有浏览器的条件语句中使用,包括样式表的名单? [英] Is there a list of browser conditionals for use including stylesheets?
问题描述
我见过的人做这样的事情在他们的HTML:
I've seen people doing things like this in their HTML:
<!--[if IE]>
<link rel="stylesheet" href="ie.css" type="text/css" />
<![endif]-->
这是否工作在所有现代浏览器,是有浏览器类型的列表,将与那种if语句?
Does this work across all modern browsers and is there a list of browser types that will work with that kind of if statement?
修改
感谢<一个href=\"http://stackoverflow.com/questions/46124/is-there-a-list-of-browser-conditionals-for-use-including-stylesheets#46126\"相对=nofollow>罗斯。有趣的了解 GT,LT,GTE,和放大器; LTE
推荐答案
本工程在所有浏览器,因为除了IE以外的任何看到&LT;! - IGNORED的评论 - &GT;
。只有IE浏览器读取评论,如果它包含一个条件子句。看看这篇文章
This works across all browsers because anything except IE sees <!--IGNORED COMMENT-->
. Only IE reads the comment if it contains a conditional clause. Have a look at this article
您也可以指定IE浏览器的版本。例如:
You can also specify which version of IE. For example:
<!--[if IE 8]>
<link rel="stylesheet type="text/css" href="ie8.css" />
<![endif]-->
这篇关于是否有浏览器的条件语句中使用,包括样式表的名单?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!