我的样式表页面在IE 8中无效.Styles在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>
答案 0 :(得分:0)
IE8有点像噩梦浏览器,比IE7略逊一筹,比IE9还要多。自微软“赢得”浏览器大战(针对Netscape)并踩刹车以来,IE就一直如此。
您可以为IE8做些什么:构建一组令人满意的CSS规则并添加条件注释,只让IE8看到它们。
我通常做的事情:在IE8的文件中添加规则只是为了解决浏览器缺乏能力和彻头彻尾的错误。
e.g:
<!--[if IE 8]><link rel="stylesheet" href="IE8.css"><![endif]-->
(在样式表的正常链接之后添加,以便它可以以相同的特异性进行推翻)