索引.html 在 FTP 到服务器后无法从 CSS 读取



我的网站由两个页面组成,加上我自己的风格.css非常适合我的本地。但是当我将其FTP到托管服务的服务器上时,索引.html无法从我的样式.css中读取。我已经检查了路径。我已经检查了声明的顺序。我在本地保持了相同的文件结构和相同的 CSS 声明顺序(全局到本地),并且工作正常。有人有建议吗?

以下是头部部分的外观:

我必须为我在文档中使用的脚本声明一个 CSS 样式。由于它不会读取我的风格.css所以我做了一个内部声明。

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<!--Google Font: Source Code Pro-->
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet">
<!-- Font Awesome CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- Fancybox CSS -->
<link rel="stylesheet" type="text/css" href="fancybox/jquery.fancybox.min.css">
<!-- My CSS -->
<link rel="stylesheet" type="text/css" href="css/style.css">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>

<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<!-- Fancybox jQuery -->
<script src="fancybox/jquery.fancybox.min.js"></script>

<style type="text/css">
.menuActive {
background-color: #ffffff;
}
</style>
</head>

我在服务器上的文件结构的相关部分如下(尝试包括屏幕截图,但显然我还不能在 Stackoverflow 上做到这一点):

文件夹和文件: .css 花式盒子 文件 图像 wp_admin 可湿性粉剂内容 WP-包含 .ftpquota .htaccess 默认.htm 索引.html

img 文件夹与 css 文件夹处于同一级别,并且图像正在正确加载。

这可能是因为在您的服务器上您使用https://将您的样式链接更改为类似<script src="//ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"></script>并删除 HTTP 部分

最新更新