CSS无法在github页面上工作 [英] css not working on github pages
本文介绍了CSS无法在github页面上工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我无法在网站上显示我的CSS.我真的不知道我在做什么错,我对这一切都是新手,所以我确定有些事情我看不到.
I can't get my CSS to show on the site. I really can't figure out what I'm doing wrong here, I'm very new to all of this so I'm sure there's something I just can't see.
这是实时网站. https://rusne118.github.io/mile-stone-one/4
这是我的仓库. https://github.com/rusne118/mile-stone-one
推荐答案
请记住,GitHub页面的作用域是 repo名称.
Remember that GitHub pages are scoped with repo names.
您要在CSS中加入
<link rel="stylesheet" href="/css/style.css">
此解析为 https://rusne118.github.io/css/style.css
但您想要 https://rusne118.github.io/mile-stone-one/css/style.css
只需将链接标记更改为
<link rel="stylesheet" href="/mile-stone-one/css/style.css">
这篇关于CSS无法在github页面上工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文