简体   繁体   English

SCSS 样式未应用于文件

[英]SCSS styling not getting applied to the files

Image Shown here图片显示在这里

My scss styles are not being applied.我的 scss styles 没有被应用。 Please help me figure out the issue.请帮我弄清楚这个问题。 I have attached the github link of the project and also the image of the console.我附上了项目的 github 链接以及控制台的图像。

https://github.com/webdeveloper1213/saasProject https://github.com/webdeveloper1213/saasProject

Thanks.谢谢。

I just checked your index file update your code from this我刚刚检查了您的索引文件,从中更新了您的代码

<link ref = "stylesheet" href = "/dist/style.css" />

to this对此

<link rel="stylesheet" href="./dist/style.css">

You are putting spaces around the = signs in your HTML attributes.您在 HTML 属性中的=符号周围放置了空格。 You shouldn't do that.你不应该那样做。 Remove the extra spaces on both sides of = .删除=两边的多余空格。

The real problem here is that you have a typo of link ref for link rel .这里真正的问题是你有一个link ref for link rel的拼写错误。 So the browser doesn't know that you mean to indicate a stylesheet link.所以浏览器不知道你的意思是指示一个样式表链接。

In the future you can catch errors like this by using an HTML validator: https://validator.w3.org/将来您可以使用 HTML 验证器捕获这样的错误: https://validator.w3.org/

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

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