Blogger Information
Blog 19
fans 0
comment 0
visits 10751
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
快速写代码神奇语法——Emmet 语法
牙森江
Original
421 people have browsed it

Emmet 语法

1.内容:”{text}”

  1. 如: p{Text}
  2. <p>Text</p>

2.属性和语法: “[attr]”

  1. 如: [class=name]{Text}
  2. [id=name]{Text}
  3. .name{text}
  4. #name{text}
  5. (.=class , #=id)
  6. <div class="name">Text</div>
  7. <div id="title">Text</div>

3.重复: “*”

  1. 如: #title{Text}*4
  2. <div id="title">Text</div>
  3. <div id="title">Text</div>
  4. <div id="title">Text</div>
  5. <div id="title">Text</div>

4.父子: “>”

  1. 如: ul>li{text}
  2. <ul>
  3. <li>text</li>
  4. </ul>

5.兄弟(同级): “+”

  1. 如: h1+p
  2. <h1></h1>
  3. <p></p>

6.父级: “^”

  1. 如: .box>span{text}^h3{小标题}
  2. <div class="box "><span>text</span></div>
  3. <h3>小标题</h3>

7.分组

  1. 如: nav>h3{text}+ul>li*3>a{link}
  2. <nav>
  3. <h3>text</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.序号

8.1 序号:”$”

  1. 如: ul>li{Text$}*4
  2. <ul>
  3. <li>Text1</li>
  4. <li>Text2</li>
  5. <li>Text3</li>
  6. <li>Text4</li>
  7. </ul>

8.2 自定义序号:”$@”

  1. 如: ul>li{text$@4}*4
  2. <ul>
  3. <li>text4</li>
  4. <li>text5</li>
  5. <li>text6</li>
  6. <li>text7</li>
  7. </ul>

8.3 逆序:”$@-1”

  1. 如: ul>li{text-$@-1}*4
  2. <ul>
  3. <li>text-4</li>
  4. <li>text-3</li>
  5. <li>text-2</li>
  6. <li>text-1</li>
  7. </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