简体   繁体   English

vs代码中的CSS问题

[英]CSS issue in vs code

I'm new in VS Code and I'm trying to figure out what went wrong here because css won't work for me.我是 VS Code 的新手,我想弄清楚这里出了什么问题,因为 css 对我不起作用。 The link is good because it opens with click + ctrl.该链接很好,因为它通过 click + ctrl 打开。 Both files are in the same folder.两个文件都在同一个文件夹中。 So why isn't it working?那么为什么它不起作用呢?

在此处输入图片说明

Edit saved:编辑保存:

在此处输入图片说明

Seems like you didn't save index.html .好像你没有保存index.html See the round dot?看到圆点了吗? It means it's not saved.这意味着它没有被保存。

在此处输入图片说明

Your code seems fine.你的代码看起来不错。 Also, it's always better to use a browser than using built in preview.此外,使用浏览器总是比使用内置预览更好。

使用浏览器并保存您的文件更改以查看您的项目。

Save file and try opening it with a browser.保存文件并尝试使用浏览器打开它。 I always prefer browser to test a file.我总是更喜欢浏览器来测试文件。 Sometimes 2 browsers if it has a problem.如果有问题,有时 2 个浏览器。 I suggest you to use sublime text 3 or notepad ++ with vs code because it can save you from a lot of headaches.我建议你在 vs code 中使用 sublime text 3 或 notepad ++,因为它可以让你免于很多麻烦。 :) :)

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

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