是否有使用的浏览器条件列表包括样式表? [英] 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]-->
这是否适用于所有现代浏览器,是否有适用于此类浏览器类型的列表of if statement?
Does this work across all modern browsers and is there a list of browser types that will work with that kind of if statement?
编辑
//stackoverflow.com/questions/46124/is-there-a-list-of-browser-conditionals-for-use-including-stylesheets#46126\"> Ross 。有兴趣了解 gt,lt,gte,&
Thanks Ross. Interesting to find out about gt, lt, gte, & lte.
推荐答案
这适用于所有浏览器,因为除IE之外的任何东西都会看到< ;! --IGNORED COMMENT - >
。只有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屋!