【问题标题】:Is there any way to quickly add class to an HTML element in JetBrains IDEs?有什么方法可以快速将类添加到 JetBrains IDE 中的 HTML 元素?
【发布时间】:2022-11-12 05:14:00
【问题描述】:

我正在尝试 PhpStorm,而我是从 VS Code 过来的。

我习惯于向我的 html 元素添加类和 ID,如下所示: element.classelement#id。我已经习惯了,现在我非常想念它。

有没有类似的方法可以在 PhpStorm 中为 html 元素添加类和 id?

【问题讨论】:

标签: phpstorm webstorm jetbrains-ide


【解决方案1】:

它被称为Emmet,它在 JetBrains IDE(至少基于 IDEA)中受支持。

只需按下标签(默认快捷方式,可以在Settings/Preferences | Editor | Emmet中更改)以扩展序列,例如p.red[TAB] 制作<p class="red">[CARET]</p>

https://www.jetbrains.com/help/phpstorm/using-zen-coding-support.html

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-07-06
    • 2014-07-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-12-04
    • 2011-10-22
    相关资源
    最近更新 更多