Firefox 未读取 css

Firefox not reading css

基本上是标题,尝试从具有外部 css 文件且未加载的本地主机 (WAMP) 在 firefox 上打开一个页面。 这是 header 信息:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link type="text/css" rel="stylesheet"  href="..\include\site.css" id="style">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
</head>

css 和 html 文件一样已经过验证,两者都没有错误。 css 适用于 IE 和 Chrome。在其他地方寻找解决方案,但找不到任何有用的东西。

有什么建议吗?

Thank-you!

尝试替换斜杠:

<link type="text/css" rel="stylesheet"  href="..\include\site.css" id="style">

至:

<link type="text/css" rel="stylesheet"  href="../include/site.css" id="style">

好吧,我将更详细地解释一下,以免您或其他偶然发现这里的人感到困惑:

Unix 及其变体一直使用正斜杠 (/) 来表示文件系统层次结构。另一方面,Windows 借用了它的文件系统定界符,反斜杠 (),来自 MS-DOS,恰好是它的前身。

选择互联网 URL 路径分隔符作为斜杠,因为当时的大多数开发人员都熟悉 Unix 标准。 Unix 作为路径分隔符的斜杠通常被认为是规范的分隔符。正斜杠 (/) 是基于 Web 的系统中事实上的路径分隔符。

在你的情况下,link 标签应该是:

<link type="text/css" rel="stylesheet"  href="../include/site.css" id="style">

希望对您有所帮助!!!