html - CSS 在 IE 8 中未正确加载

标签 html css

我的样式表页面在 IE 8 中不工作。样式显示在 css 页面中。但效果不佳。它在 firefox 中运行良好。我在这里添加了我的代码。有人可以解释我吗?

<html class="no-js no-touch"><head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">

<title>Tasmanian Self-Drive Tour – eBook guides</title>

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="robots" content="noindex,nofollow">
<meta name="description" content="Imagine arriving in Tasmania and being able to start sightseeing immediately, with absolutely no effort. With either of these eBooks, you’ll have the easiest holiday you’ve ever had."><meta name="keywords" content="Tasmania, Tasmanian, selfdrive tour, self-drive tour, touring Tasmania, driving around Tasmania, Tasmania by car, sightseeing Tasmania, travelling around Tasmania, travelling with kids, tassie, tassie tour, tasmania with kids">
<!--BEGIN-STYLESHEETS-->
<link href="css/bootstrap.min.css" rel="stylesheet" media="all">
<link href="fonts/font-awesome/css/font-awesome.min.css" rel="stylesheet">

<!-- google font css link -->

<link href='http://fonts.googleapis.com/css?family=Asap:400,700,400italic,700italic|Roboto+Slab:400,100,300,700' rel='stylesheet' type='text/css'>
<!-- additional styles -->
<link href="css/main.css" rel="stylesheet" media="all">
<link href="css/component.css" rel="stylesheet" media="all">
<link href="css/responsive.css" rel="stylesheet" media="all">
<style type="text/css"></style>
<!-- Enable this css if you want to override styles-->
<!--<link href="css/override.css" rel="stylesheet" media="screen">-->
<!--END-OF-STYLESHEETS-->
<!-- Favicon and Apple Icons -->
<link rel="shortcut icon" href="img/icons/favicon.ico">
<link rel="apple-touch-icon" href="img/icons/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="72x72" href="img/icons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="img/icons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="144x144" href="img/icons/apple-touch-icon-144x144.png">
<script type="text/javascript" src="js/modernizr.custom.js"></script>

最佳答案

IE8 有点像噩梦般的浏览器,比 IE7 弱一点,但比 IE9 强很多。自从微软“赢得”浏览器大战(对 Netscape)并踩下刹车以来,IE 就一直如此。

您可以为 IE8 做什么:构建一组它满意的 CSS 规则并添加条件注释以仅让 IE8 看到它们。

我通常做的是:在 IE8 的文件中添加规则,只是为了解决浏览器功能不足和完全错误的问题。

例如:

<!--[if IE 8]><link rel="stylesheet" href="IE8.css"><![endif]-->

(在样式表的正常链接之后添加它,以便它可以以相同的特异性否决)

关于html - CSS 在 IE 8 中未正确加载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33545101/

相关文章:

html - 嵌套表格的边框 - 不需要,有一个

html - 按钮建议消息

javascript - 标题中的 CSS 覆盖

jquery - Materialise 移动导航栏没有响应

javascript - 使用highlighttextarea插件突出显示文本区域中的文本(如果不在数组中)

css - 如何使用 CSS 将 "arrow-down"三 Angular 形添加到响应式选项卡

javascript - css背景图片移动

asp.net - WebControl.CssClass 与 WebControl.Attributes ["class"]

html - 在 tumblr 主题上定位 flash 对象

html - 如何做 div 元素的网格?