首页 > 解决方案 > 如何从 VScode 上的 css 文件中的 html 文件获取 css 类建议?

问题描述

假设我有一个这样的 html 文件:

//index.html

<div class="home__data">
<h1 class="home__title">Hi, I'am Alexa</h1>
<h3 class="home__subtitle">Frontend Developer</h3>
<p class="home__description">High level experience in web design, knowledge and producing quality work.</p>
<a href="#" class="button button--flex">
Contact Me <i class="uil uil-message button__icon"></i>
</a>
</div>

现在我想在我的VSCODE上的 css 文件中获得这个 index.html文件的css 类的建议

您可以考虑vscode 上的 css intelliSense。如果我们在我的 html 文件上编写 css 类属性,我们会得到在 css 文件中编写的类的建议。我想要这样的东西,但我想在我的类的css 文件中得到建议,这些文件是用 html 文件编写的。

//style.css

那可能吗?

标签: htmlcssvisual-studio-code

解决方案



推荐阅读