Firefox不会加载CSS

时间:2013-05-30 10:12:08

标签: css google-chrome firefox stylesheet

Firefox不会加载我的CSS:/ 这就是我把它包括在内的方式:

<!DOCTYPE html>
<html>
<head>
<title>Title here ;)</title>
<link type="text/xss" rel="stylesheet" href="/css/main.css" />
<script type="text/javascript" src="js/jquery.js"></script>

我的网站有2个CSS文件,它加载第二个,但不是main.css ... 这就是main.css的样子:

body
{
  background-color:#6F6B6B;
}

hr
{
  color:lime;
}

a
{
  text-decoration:none;
  color:#A3F0FF;
}

a:hover
{
  color:#2EADC5;
}

.content
{
  margin-left:auto;
  margin-right:auto;
  width:85%;
  color:#ccc;
}

.logo
{
  margin-left:25px;
}

.navi
{
  margin: auto auto;
  float:right;
  display:inline;
}

.slogan
{
  display:inline;
  margin-left:25px;
}

.error
{
  background: #FE9A2E;
  color: #FF0000;
  border-top: 2px solid #DF0101;
  border-bottom: 2px solid #DF0101;
  text-align: center;
  padding: 5px 20px;
  font-size: 13px;
  margin-bottom: 15px;
}

.success
{
  background: #A9F5A9;
  color: #01DF01;
  border-top: 2px solid #2EFE2E;
  border-bottom: 2px solid #2EFE2E;
  text-align: center;
  padding: 5px 20px;
  font-size: 13px;
  margin-bottom: 15px;
}

.ref
{
  width: 75%;
  margin: 0 auto;
}

它在Chrome中完美运行,但在Firefox中却不行 - 有人可以解释一下原因吗?

注意:它甚至不会在Firefox中加载。我可以在Firefox中使用Inspect Element包含脚本,但这不是它应该如何工作:/

该网站目前托管在我的电脑上,所以我无法提供链接,因为它只能被认为是127.0.0.1

编辑:哎哟....对不起这个愚蠢的问题,我写了“xss”而不是“css”: 感谢巴勃罗。 :)

1 个答案:

答案 0 :(得分:1)

问题在于:

<!DOCTYPE html>
<html>
<head>
<title>Title here ;)</title>
<link type="text/xss" rel="stylesheet" href="/css/main.css" />
<script type="text/javascript" src="js/jquery.js"></script>

它应该是这样的:

<!DOCTYPE html>
<html>
<head>
<title>Title here ;)</title>
<link type="text/css" rel="stylesheet" href="/css/main.css" />
<script type="text/javascript" src="js/jquery.js"></script>