无法在部署时加载同文件夹中的CSS文件。

huangapple go评论74阅读模式
英文:

Cant Load The CSS File In The Same Folder When I Deploy

问题

我有 CSS 文件和 HTML 文件放在同一个文件夹中,就像这样:CSS 文件在 asset 文件夹中

但是当我部署项目到 web 上时,只加载了 HTML 文件,CSS 没有加载。在 HTML 文件中,我像这样添加了标签 <link rel="stylesheet" href="assets/libs/css/style.css">,但它没有起作用。帮帮我。谢谢帮助!

英文:

I have css files and HTML file put in the samefolder folder like this: The css file is in the asset folder

But when i deploy the project the web, just load the html file, the css doesn't. In HTML file, i add the tag &lt;link rel=&quot;stylesheet&quot; href=&quot;assets/libs/css/style.css&quot;&gt; like this but it doesn't work.
Help me. Thanks for helping me.

答案1

得分: 0

这可能是一个非常基础的回复,如果是这样,我道歉,但你在两个地方拼写文件名是否相同呢?例如,你的.html文件中的链接可能是style.css,但实际文件的名称却是styles.css吗?我也经常犯这个错误!

英文:

This might be a really basic reply and apologies if so, but have you spelt the file name the same in both places? For example, could your link in your .html be for style.css but the names of the file is actually styles.css? I've done this plenty of times!

答案2

得分: 0

我已经解决了我的问题。我需要将所有的文件命名为css、font和其他内容,然后加载到过滤器中。很抱歉,因为我忘记告诉大家我有过滤器文件:<。感谢大家的支持。

英文:

I have been solved my problem. I need to name all files css, font and other things into the Filter to load it. Sorry everyone because i forgot to tell every one about i have the Filter file :<. Thanks for support me.

huangapple
  • 本文由 发表于 2020年5月3日 16:56:51
  • 转载请务必保留本文链接:https://go.coder-hub.com/61571896.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定