有没有办法使用Emmet突出显示并包装以下几行:
This is a title
This is a subtitle
This is the sentence below the subtitle.
这样它就会输出:
<h2>This is a title</h2>
<h3>This is a subtitle</h3>
<p>This is the sentence below the subtitle.</p>
我试过了:
h2+h3+p
但是那个输出:
<h2></h2>
<h3></h3>
<p>This is a titleThis is a subtitleThis is the sentence below the subtitle.</p>
答案 0 :(得分:1)
试试这个:
h2{This is a title}+h3{This is a subtitle}+p{This is the sentence below the subtitle.}
JS Fiddle :(只需按行末尾的标签:)
答案 1 :(得分:0)
不,这是不可能的。在这种情况下,单独包装每一行的速度要快得多,而不是单一缩写的新语法。