【发布时间】:2013-09-08 09:39:36
【问题描述】:
如果您使用不受支持的浏览器 IE
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="chrome=1"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
...
</head>
<!--[if lte IE 8]>
<div style="position:absolute;bottom:0px;left:0px;background-color:orange;color:white;z-index:1000;width:250px;text-align:center;">This content is best viewed in Chrome, Firefox or any other Modern Browser. <br/><strong>Please Upgrade. </strong></div>
<![endif]-->
【问题讨论】:
-
它是否也响应 IE 10?你能做一个
IE 8 and not IE 10条件吗? -
@Renan:这里的问题是 IE10根本不应该看到条件 cmets。
-
(它可以看到它们,但它不应该试图解释它们。)
-
IE10 正在查看和解释条件 cmets 内部的内容,即使它们与其他 IE 版本(例如 8 和 9)明确相关。我可以做些什么来让 IE10 忽略这些 cmets? 仍然在 IE 10 中触发。这很烦人。
标签: html internet-explorer internet-explorer-10 meta conditional-comments