Html IE条件不适用于.js和.css

Html IE条件不适用于.js和.css,html,css,internet-explorer,Html,Css,Internet Explorer,我使用此代码是为了仅为ie浏览器加载ie.css。但它不起作用,我很困惑! 谁能帮我 <html> <head> <title>Demo for IE</title> <!--[if IE]> <link rel="stylesheet" type="text/css" href="ie.css" /> <![endif]--> </h

我使用此代码是为了仅为ie浏览器加载ie.css。但它不起作用,我很困惑! 谁能帮我

<html>
    <head>
      <title>Demo for IE</title>
      <!--[if IE]>
          <link rel="stylesheet" type="text/css" href="ie.css" />
      <![endif]-->
    </head>
    <body>
        <h1>Testing for IE</h1>
    </body>
</html>

IE演示
IE测试

IE10和IE11不再支持条件注释。因此,很可能您正在使用这些版本中的任何一个

供参考:


这将在IE9以下的ie上应用ie.css。你可以改变IE版本

<!DOCTYPE html>
<html lang="en">
<head>
    <!--[if lt IE 9]>
 <link rel="stylesheet" type="text/css" href="ie.css" />
    <![endif]-->
</head>


<body>
</body>
</html>