【问题标题】:Is there any shortcut for custom attributes using IntelliSense Emmet?是否有使用 IntelliSense Emmet 的自定义属性的快捷方式?
【发布时间】:2019-11-22 01:57:27
【问题描述】:

例如,我想用这个输入:

.classOne#idOne?customAttribute?customAttributeValue

然后,当点击键盘上的 Tab 时,我想得到这个输出:

<div class="classOne" id="idOne" customAttribute="customAttributeValue"></div>

什么是 {?} 字符可以使这个输入/输出成为可能?

【问题讨论】:

    标签: html visual-studio-code intellisense emmet


    【解决方案1】:

    【讨论】:

      【解决方案2】:

      Emmet Docs 可以描述如何做到这一点。

      输入:

      .classOne#idOne[customAttribute=customAttributeOne]
      

      输出:

      <div class="classOne" id="idOne" customAttribute="customAttributeOne"></div>
      

      【讨论】:

      • 你可以引用人,但如果你引用了,那么你应该在引号中包含相关部分(在你的答案中加上前缀行>将它们格式化为引号)并直接提供指向源的链接,不仅仅是他们的网站
      猜你喜欢
      • 2019-03-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-04-29
      • 2019-03-21
      • 1970-01-01
      • 1970-01-01
      • 2020-09-10
      相关资源
      最近更新 更多