Blogger Information
Blog 35
fans 0
comment 0
visits 16656
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
Emmet语法练习实例
手机用户311660634
Original
403 people have browsed it

1.标签与内容

语法:标签+大括号

h3{这里填写内容}
生成:

<h3>这里填写内容</h3>

2.属性和语法糖

语法:[属性]{内容}
[id=test]{测试}
生成:

<div id="test">测试</div>

[class=title]{test}
生成:
<div class="title">test</div>

注:div标签是默认,可以不写

语法糖: #=id .=class
语法:
.title{test}
生成:

<div class="title">test</div>

语法:
#test{测试}
生成:

<div id="test">测试</div>

3.重复 *

重复用*号,要重复几行就在*号后面加数字几
语法:
#test{测试}*3
生成:

  1. <div id="test">测试</div>
  2. <div id="test">测试</div>
  3. <div id="test">测试</div>

4.父子 >

父子级用>
语法:
ul>li{练习}*3
生成:

  1. <ul>
  2. <li>练习</li>
  3. <li>练习</li>
  4. <li>练习</li>
  5. </ul>

5.兄弟 +

兄弟级用+
语法:
ul+p+li
生成:

  1. <ul></ul>
  2. <p></p>
  3. <li></li>

6.父级^

父级用^号,shift+数字6可以打出来
语法:
ul>li{test}*3^h3
生成:

  1. <ul>
  2. <li>test</li>
  3. <li>test</li>
  4. <li>test</li>
  5. </ul>
  6. <h3></h3>

7.分组()

分组加()
语法:
div>h3{标题}+(ul>li*3>a{test})
生成:

  1. <div>
  2. <h3>标题</h3>
  3. <ul>
  4. <li><a href="">test</a></li>
  5. <li><a href="">test</a></li>
  6. <li><a href="">test</a></li>
  7. </ul>
  8. </div>

8.序号 $ $@ $@-1

语法:$从1开始正序
ul>li{test$}*3
生成:

  1. <ul>
  2. <li>test1</li>
  3. <li>test2</li>
  4. <li>test3</li>
  5. </ul>

语法:$@自定义从整数几开始正序
ul>li{test$@5}*3
生成:

  1. <ul>
  2. <li>test5</li>
  3. <li>test6</li>
  4. <li>test7</li>
  5. </ul>

语法:$@-1倒序
ul>li{test$@-1}*3
生成:

  1. <ul>
  2. <li>test3</li>
  3. <li>test2</li>
  4. <li>test1</li>
  5. </ul>
Correcting teacher:PHPzPHPz

Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post