IE11对条件评论没有反应

时间:2017-07-21 12:34:13

标签: css internet-explorer conditional-comments

我在我的网站上使用异步javascript函数,Internet Explorer 11或更低版本不支持。因此,我想向IE用户显示警告。为此,我使用了以下代码:

<!--[if lte IE 11]> <style type="text/css"> 
#browserWarning { display:; }
#frame { display: block; }
</style> <![endif]-->

<div id="browserWarning">
    <h1>Internet Explorer is not supported!</h1>
    Unfortunately, Internet Explorer does not support asynchronous javascript functions. Therefore, this tool can only be used with current versions of Chrome (>= 58), Firefox (>=52), Opera (>=45) and Edge (>=15). Sorry!
</div>

但是,当我使用Internet Explorer 11打开页面时没有任何反应。我在样式表中将#browserWarning设置为display:none。有人能告诉我我做错了吗?

0 个答案:

没有答案
相关问题