Blogger Information
Blog 25
fans 0
comment 0
visits 10622
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
Emmet常用的8种语法形式
PHui
Original
559 people have browsed it

1.标签与内容:{默认标签}

  1. <h2>html是结构化标签语言</h2>
  2. <!-- 默认标签为div -->
  3. <div class="title">默认标签</div>

2.属性与语法糖:[attr]

  1. <!-- [id=name]{name} -->
  2. <div id="name">name</div>
  3. <!-- [class=title]{title} -->
  4. <div class="title">title</div>
  5. <!-- id,class是高频,通用属性,emmet为它定制了"语法糖" -->
  6. <!-- id => #,class => . -->
  7. <!-- #name{name1} -->
  8. <div id="name">name1</div>
  9. <!-- .tittle{tittle1} -->
  10. <div class="tittle">tittle1</div>

3.重复:*

  1. <!-- .container{box}*3 -->
  2. <div class="container">box</div>
  3. <div class="container">box</div>
  4. <div class="container">box</div>

4.父子:>

  1. <!-- tr*2>td{text}*2 -->
  2. <tr>
  3. <td>text</td>
  4. <td>text</td>
  5. </tr>

5.兄弟:+

  1. <!-- h1{bo1}+p{bo2} -->
  2. <h1>bo1</h1>
  3. <p>bo2</p>

6.父级:^

  1. <!-- .box>span{text}^h3{bo3} -->
  2. <div class="box">
  3. <span>text</span>
  4. </div>
  5. <h3>bo3</h3>

7.分组:(...)

  1. <!-- nav>h3{导航}+(ul>li*3>a{link})*1 -->
  2. <nav>
  3. <h3>导航</h3>
  4. <ul>
  5. <li><a href="">link</a></li>
  6. <li><a href="">link</a></li>
  7. <li><a href="">link</a></li>
  8. </ul>
  9. </nav>

8.序号:$,$@

  1. <!-- 默认从1开始:table>tr>td{num$}*3 -->
  2. <table>
  3. <tr>
  4. <td>num1</td>
  5. <td>num2</td>
  6. <td>num3</td>
  7. </tr>
  8. </table>
  9. <!-- 自定义起始序号:table>tr>td{num$@5}*3 -->
  10. <table>
  11. <tr>
  12. <td>num5</td>
  13. <td>num6</td>
  14. <td>num7</td>
  15. </tr>
  16. </table>
  17. <!-- 逆序:table>tr>td{num$@-1}*3 -->
  18. <table>
  19. <tr>
  20. <td>num3</td>
  21. <td>num2</td>
  22. <td>num1</td>
  23. </tr>
  24. </table>

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