简体   繁体   English

PhpStorm-HTML类建议

[英]PhpStorm - html classes suggestions

Is it possible to suggest css classes from my css files in PhpStorm when coding html templates? 编码html模板时,是否可以从PhpStorm中的CSS文件中建议CSS类? In Netbenas, this was pretty awesome function and I would like to use this in PhpStorm too. 在Netbenas中,这是一个很棒的功能,我也想在PhpStorm中使用它。

在此处输入图片说明

Yes you can. 是的你可以。 PhpStrom is very smart it automatically includes every single css class which we written in your stylesheets, Just simply add your any CSS classes in your stylesheets, PhpStrom非常聪明,它会自动包含我们在样式表中编写的每个CSS类,只需在样式表中添加任何CSS类,

Eg: You have style.css and now you want to use a class my-class{background-color: green;} if your CSS is included in your project then it will automatically show up in your HTML code when you write it. 例如:您有style.css,现在您要使用my-class{background-color: green;}如果您的项目中包含CSS,那么编写CSS时它将自动显示在HTML代码中。

在此处输入图片说明

在此处输入图片说明

Also consider to exclude <style> tags inside your template files. 还可以考虑在模板文件中排除<style>标签。 I was desperately googling until I found this thread in jetbrains support forums 我拼命地搜寻,直到在jetbrains支持论坛中找到此线程

I really had some included styles in template and this was the problem. 我的确在模板中包含了一些样式,这就是问题所在。

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

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