CSS无法在IE或Firefox中运行 - Chrome工作正常

时间:2013-11-27 16:15:55

标签: html css google-chrome firefox safari

网页     http://144.76.221.141:8000 在Chrome和Safari中显示正确的CSS样式,但拒绝在Firefox或Chrome中显示。我已经看到添加doctype是一个常见的修复方法,但这对我的问题没有任何帮助。任何指向解决方案的指针都将非常感激。

4 个答案:

答案 0 :(得分:3)

样式表上的type必须如下所示:

<link type="text/css" href="/css/parent.css" rel="stylesheet">
<link type="text/css" href="/css/landing-page.css" rel="stylesheet">
<link type="text/css" href="/css/dropit.css" rel="stylesheet">

在开头删除/

答案 1 :(得分:2)

删除样式表声明类型中的斜杠:

<link rel="stylesheet" href="/css/parent.css" type="/text/css" />

<link rel="stylesheet" href="/css/parent.css" type="text/css" />

答案 2 :(得分:1)

这个链接CSS的声明

<link href="/css/dropit.css" rel="stylesheet" type="/text/css"></link>

您需要删除/上应该

的额外斜杠type="/text/css"
<link href="/css/dropit.css" rel="stylesheet" type="text/css"></link>

答案 3 :(得分:0)

只需将IE添加到样式表中即可编写IE。

<!--[if IE 8]>
<style>...</style>
<![endif]-->

如需进一步参考,请访问http://www.quirksmode.org/css/condcom.html