【发布时间】:2017-10-03 01:28:16
【问题描述】:
你能告诉我 IE 浏览器会发生什么吗?
<!DOCTYPE html><!--[if lt IE 9]><html class="no-js lt-ie9" lang="en" dir="ltr"><![endif]--><!--[if gt IE 8]><!-->
<html class="no-js" lang="en" dir="ltr">
<!--<![endif]-->
<head>
...
我可以理解非 IE 浏览器只会解释:
<html class="no-js" lang="en" dir="ltr">
但大于 IE8 的条件没有多大意义:
<!--[if lt IE 9]> ... <!--[if gt IE 8]><!-->
<html class="no-js" lang="en" dir="ltr">
<!--<![endif]-->
这是黑客行为吗?打开和关闭 cmets 的符号不匹配。
【问题讨论】:
标签: html internet-explorer conditional-comments