【问题标题】:CSS not being applied on GitHub pages [closed]CSS 未应用于 GitHub 页面 [关闭]
【发布时间】:2020-12-12 23:53:05
【问题描述】:

我已经上传了我的文件,但样式没有出现,我不知道为什么会出错。

这是我的网站的外观:https://acrt3.github.io/profile/

Here is the code in my index file linking the stylesheet

Here is image of my file tree

【问题讨论】:

  • 您没有正确链接到文件。你能发布你的文件树吗?
  • 您的文件夹中没有 style.css 之类的文件。你上传文件了吗???
  • 我已经上传了文件树。我的styles.css文件在css文件夹中

标签: html css github github-pages


【解决方案1】:

您的 css 文件夹名为 CSS(大写)。试试

<link rel="stylesheet" type="text/css" href="CSS/styles.css">

【讨论】:

  • 这并没有改变任何东西
  • 顺便说一句,文件夹和文件使用小写名称是一个好习惯。
  • 应该可以解决,我试过了。用这个替换你的行。
  • 这已经成功了,肯定需要一段时间才能更新,谢谢!
猜你喜欢
  • 2015-02-13
  • 2019-01-30
  • 1970-01-01
  • 1970-01-01
  • 2014-06-23
  • 2016-11-24
  • 2022-01-21
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多