我想声明一种与 ie6 和 ie7 不同的样式,但我在 css 中的条件被 IE7 识别为 IE6。我使用 XP 和 explorer 7。这是我使用的代码:
<!--[if !IE]>
#mainDiv{text-align:-moz-center;}
#skyBanner {top:0px;left:0px; position:fixed;visibility:hidden;}
<![endif]-->
<!--[if lt IE 7]>
body > #skyBanner { position: fixed;}
#skyBanner {position:absolute;visibility:hidden;
left: expression( ( 0 + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' );
top: expression( ( 0 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' );
}
<![endif]-->
<!--[if IE 7]>
#skyBanner {position:fixed;visibility:hidden;
}
<![endif]-->
我的错误是什么?