2013-10-21 57 views
0

Firefox不会加载我的网站的一部分,我在加载CSS时遇到了问题。 Chrome和IE浏览器都可以正常加载它们。Firefox将无法加载我的CSS

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"/
+2

请不要链接到你的网站。阅读此:http://meta.stackexchange.com/questions/125997/something-in-my-web-site-or-project-doesnt-work-can-i-just-paste-a-link-to-it –

+2

@ user2902115,你忘记了和>处的“>”。 –

回答

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> 
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 * 
} 
+0

'* property'对IE来说是黑客攻击,所以它们会在其他浏览器中被跳过。 –

+0

[14:12:01.395]解析'background-image'的值时出错。声明下降了。 @ css/bootstrap.css:3410那个呢? – user2902115