我有一个jsp文件,在jsp的开头,我有下面的代码行。
<!--[if lt IE 7]><html lang="en" class="no-js lt-ie10 lt-ie9 lt-ie8 lt-ie7" xml:lang="en" xmlns:fb="http://www.facebook.com/2008/fbml"> <![endif]-->
<!--[if IE 7]><html lang="en" class="no-js lt-ie10 lt-ie9 lt-ie8" xml:lang="en" xmlns:fb="http://www.facebook.com/2008/fbml"> <![endif]-->
<!--[if IE 8]><html lang="en" class="no-js lt-ie10 lt-ie9" xml:lang="en" xmlns:fb="http://www.facebook.com/2008/fbml"> <![endif]-->
<!--[if IE 9]><html lang="en" class="no-js lt-ie10" xml:lang="en" xmlns:fb="http://www.facebook.com/2008/fbml"> <![endif]-->
<!--[if gt IE 9]><!--><html lang="en" class="no-js" xmlns="http://www.w3.org/1999/html" xml:lang="en" xmlns:fb="http://www.facebook.com/2008/fbml"> <!--<![endif]-->如果i remove the above lines then page is not rendered in IE but it renders in FF.请有人解释一下上面的台词是什么?
发布于 2013-08-19 11:33:58
它与JSP无关,它只被IE“理解”,它是Microsoft的一个非标准添加,如果您只有IE代码,那么就使用一个条件HTML包含:
<!--[if lt IE 7]> ... <![endif]-->其他浏览器不会看到代码,因为它们将“看到”的是一个标准的HTML注释<!-- ... -->。
条件词[if lt IE 7]、[if IE 8]等在某种程度上是不言自明的:[if lt IE 7]的意思是“如果IE版本低于7,则添加此”,如果IE版本为8,则添加此“[if IE 8]”。
发布于 2013-08-19 11:40:37
它们被称为条件注释。它用于检测的版本
获取详细信息这里。
发布于 2013-08-19 12:00:07
线下的指示是什么?
<html lang="en" class="no-js lt-ie10 lt-ie9 lt-ie8 lt-ie7"
xml:lang="en" xmlns:fb="facebook.com/2008/fbml">这意味着:
https://stackoverflow.com/questions/18312744
复制相似问题