0

Firefox 不会加载我网站的一部分,我在加载我认为的 CSS 时遇到问题。Chrome 和 IE 都可以正常加载它们。

http://zionscape.net/landing/RuneScape%20Fanpage/index.html在 Chrome 中完美加载。

<!DOCTYPE html>
<HEAD>
       <BODY bgcolor="#000000">


        <title>Site - Home</title>
        <link href="css/bootstrap.css" type="text/css" rel="stylesheet" />
        <link href="css/style.css" type="text/css" rel="stylesheet" /
4

2 回答 2

1

该网页可能缓存在 Firefox 中。尝试按 清除浏览器缓存ctrl + shift + del。选中“缓存”,然后单击“立即清除”。您还希望将您的 css 文件放在<head>. <body>它看起来像:

<head>
    <title>Site - Home</title>
    <link href="css/bootstrap.css" type="text/css" rel="stylesheet" />
    <link href="css/style.css" type="text/css" rel="stylesheet" /
</head>
<body bgcolor="#000000">
    ...
</body>
于 2013-10-21T18:32:10.790 回答
0

CSS 可以在 Firefox 中正确加载,但您的 CSS 中存在未在 Firefox 中呈现的错误(但在 IE/Chrome 中呈现)。看看 Firefox Web 控制台;它列出了 bootstrap.css 中没有被渲染的行号。

要使用 Web 控制台,请访问:

工具 --> Web 开发人员 --> Web 控制台

以下是 Web 控制台中列出的四个错误:

[14:30:32.700] Expected declaration but found '*'.  Skipped to next declaration. @ http://zionscape.net/landing/RuneScape%20Fanpage/css/bootstrap.css:3462
[14:30:32.700] Expected end of value but found '\9 '.  Error in parsing value for 'background-color'.  Declaration dropped. @ http://zionscape.net/landing/RuneScape%20Fanpage/css/bootstrap.css:3467
[14:30:32.700] Expected declaration but found '*'.  Skipped to next declaration. @ http://zionscape.net/landing/RuneScape%20Fanpage/css/bootstrap.css:3472
[14:30:32.700] Expected declaration but found '*'.  Skipped to next declaration. @ http://zionscape.net/landing/RuneScape%20Fanpage/css/bootstrap.css:3473

末尾的数字是指语法错误的行号。例如,bootstrap.css:3473表示 bootstrap.css 的第 3473 行有错误。

以下是上述四个错误的 CSS,其中的问题已在注释中指出:

.btn-inverse.disabled,
.btn-inverse[disabled] {
  color: #ffffff;
  background-color: #222222;
  *background-color: #151515; // Issue here is the *
}

.btn-inverse:active,
.btn-inverse.active {
  background-color: #080808 \9; // Issue here is the "/9"
}

button.btn,
input[type="submit"].btn {
  *padding-top: 3px; // Issue here is the *
  *padding-bottom: 3px; // Issue here is the *
}
于 2013-10-21T18:35:32.630 回答