网站发布后,IE条件语句不起作用

时间:2014-02-07 18:40:28

标签: html css internet-explorer twitter-bootstrap webmatrix

我使用Bootstrap 3创建了一个简单的HTML页面。此页面没有任何服务器端脚本。它是使用Microsoft Webmatrix制作的。当站点在Webmatrix(即IIS Express)中运行时,IE条件语句可以完美地工作,并且该站点会像旧版本的Internet Explorer一样呈现。当站点实时发布到使用任何形式的IIS的的Web主机时,IE条件不起作用。我已经检查了Winmerge中的代码,它是完全相同的。该网站只是Javascript,HTML和CSS,没有什么需要IIS。有谁知道任何可能的解决方案吗?条件如下:

<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<title>Site</title>
    <!-- Bootstrap core CSS -->
<link href='http://fonts.googleapis.com/css?family=Oxygen:400,300,700|Josefin+Sans:400,100,100italic,300,300italic,400italic,600,600italic,700,700italic|Pacifico|Quicksand:400,300,700' rel='stylesheet' type='text/css'>
<link href="css/bootstrap.css" rel="stylesheet" />
<link href='http://fonts.googleapis.com/css?family=Arimo' rel='stylesheet' type='text/css'>
<link href="css/font-awesome.css" rel="stylesheet" />
<link href="css/styles.css" rel="stylesheet" />
<!--[if IE]>
   <link href="../css/bootstrap-ie7.css" rel="stylesheet">
   <link href="../css/font-awesomeOld.css" rel="stylesheet">
   <link rel="stylesheet" href="../css/font-awesome-ie7.css">
   <script>
       var head = document.getElementsByTagName('head')[0],
       style = document.createElement('style');
       style.type = 'text/css';
       style.styleSheet.cssText = ':before,:after{content:none !important';
       head.appendChild(style);
       setTimeout(function(){
           head.removeChild(style);
       }, 0);
   </script>
   <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]--> 

0 个答案:

没有答案
相关问题