简体   繁体   English

我怎样才能让 CSS 在 EJS 文件中工作

[英]How can I get CSS will to work in EJS file

Im doing a small project and trying to get CSS working in ejs/node.我在做一个小项目并试图让 CSS 在 ejs/node 中工作。 I dont know why it wont load.我不知道为什么它不会加载。

[enter image description here][1] [在此处输入图片描述][1]

Also having a massive issue with getting images to load.在加载图像方面也存在巨大问题。

one file example - -->h一个文件示例 - -->h

Are you sure you are calling the template engine?您确定要调用模板引擎吗?

app.use(express.static('public'));

Did you call static files like this.你这样调用static文件了吗。 The name "public" may change depending on your project.名称“public”可能会根据您的项目而改变。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM