简体   繁体   English

在 VS Code 上运行我的 CSS 时遇到问题

[英]Having problem with running my CSS on VS Code

I am new to using vscode.我是使用 vscode 的新手。 I am trying to practice HTML and CSS.我正在尝试练习 HTML 和 CSS。 I was able to run my HTML but when I try to debug and run my CSS its not working.我能够运行我的 HTML 但是当我尝试调试和运行我的 CSS 时它不起作用。 it says file can't be reached.它说文件无法访问。 Thanks谢谢

You have to link your css file like this:您必须像这样链接您的 css 文件:

<head>
 <link rel="stylesheet" href="styles.css">
</head>

{You should post your code} {您应该发布您的代码}

Remember to add this line in HTML记得在 HTML 中添加这一行

<style href='Your CSS file name'></style>

Or you can also use:或者你也可以使用:

<link href='Your CSS file name'></link>

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

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