繁体   English   中英

Firefox无法加载CSS

[英]Firefox won't load CSS

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文件,它将加载第二个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中加载。 我可以使用Inspect Element将脚本包含在Firefox中,但这不是它应该工作的方式:/

该站点目前托管在我的PC上,因此我无法提供链接,因为只能通过127.0.0.1才能访问该链接。

编辑:哎呀....对于这个愚蠢的问题,我写的是“ xss”而不是“ css”:| 感谢Pablo。 :)

这是问题所在:

<!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>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM