初始化模板在IE 8中无法正确呈现

时间:2014-01-23 20:15:54

标签: html html5 internet-explorer html5boilerplate

我正在使用Initializr template创建新网站。它在现代Web浏览器上看起来很棒。我虽然它已经针对兼容性进行了优化,但是当我在Internet Explorer 8中打开它时(浏览器我必须不幸地支持它),它看起来像这样:

enter image description here

如您所见,标签导航未正确呈现。

我使用的是默认值:

<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->

<html class="no-js">
<!--<![endif]-->
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title></title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width">

    <link rel="stylesheet" href="css/normalize.min.css">
    <link rel="stylesheet" href="css/main.css">

    <script src="js/vendor/modernizr.custom.82220.js"></script>
</head>

上面唯一的区别是我尝试更新modernizr以查看它是否能解决问题,但结果是一样的。如何在IE 8中正确呈现HTML5样板?

1 个答案:

答案 0 :(得分:0)

问题已解决,将其添加到css页面:

@media only screen and (min-width: 480px) {
    .lt-ie9 nav a { margin: 0 0.7%; }
}
相关问题