Internet explorer 在特定版本的IE中呈现Div

Internet explorer 在特定版本的IE中呈现Div,internet-explorer,internet-explorer-7,internet-explorer-9,Internet Explorer,Internet Explorer 7,Internet Explorer 9,我有一个我有意在IE7中呈现的应用程序,但是如果浏览器是IE8+,我希望在IE9版本中呈现div 有什么办法吗 在IE7中呈现应用程序的原因是因为我的客户机也在使用XP 请帮助..您可以使用IE的条件注释: 就你而言: <!--[if gte IE 8]> <div>Your div</div> <![endif]--> 您可以使用“CSS HACK”来区分IE的不同版本。有一些方法可以做到这一点。 1.条件注释 <!--[if gt

我有一个我有意在IE7中呈现的应用程序,但是如果浏览器是IE8+,我希望在IE9版本中呈现div

有什么办法吗

在IE7中呈现应用程序的原因是因为我的客户机也在使用XP


请帮助..

您可以使用IE的条件注释:

就你而言:

<!--[if gte IE 8]>
<div>Your div</div>
<![endif]-->

您可以使用“CSS HACK”来区分IE的不同版本。有一些方法可以做到这一点。 1.条件注释

<!--[if gte IE 8]>this only works in IE8+<![endif]-->
3.媒体

@media screen\0 {body { background: green; }}/*works in IE8+*/
有关更多详细信息,请访问:

@media screen\0 {body { background: green; }}/*works in IE8+*/