IE 8 特定样式表无法使用条件注释

IE 8 specific stylesheet won't work using Conditional Comment

我的网站只是在屏幕上显示 "Why is this text small?" 字样。它正确地响应了应用到它的 css 样式,但 不在 IE 8

html是:

<!--[if IE 8 ]>
  <p>Only IE 8 will see this</p>
<![endif]-->

<div class="font4">Why is this text small?</div>

顶部样式标签中 "font4" 的样式是:

.font4 {
    margin-top: 4%;
    margin-bottom:3%;
    color: #030;
    font-family: "Times New Roman", Times;
    font-size: 6vh;
    text-align:center;
}

但是如果我在IE 8中查看,显示太小,像这样:

所以我把这个 html 放在开头:

<!--[if IE 8]>
    <link rel="stylesheet" type="text/css" href="http://testsite24.netai.net/public/ie8.css">
<![endif]-->

和 ie8.css 已正确链接。 ie8.css 的代码是:

@charset "utf-8";
/* CSS Document */

.font4 {
    margin-top: 4%;
    margin-bottom:3%;
    color: #030;
    font-family: "Times New Roman", Times;
    font-size: 10vh;
    text-align:center;
}

但是为什么没有响应font-size: 10vh;

您可以在这里查看我的网站:http://testsite24.netai.net/public/demo.html

谢谢!

只是因为viewport-percentage lengths, such as vh, are not supported in IE8.