Blogger Information
Blog 9
fans 0
comment 0
visits 3346
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
emmet语法的使用
杨雨辰
Original
375 people have browsed it

emmet语法的使用

1.层级:父子 兄弟关系。

  1. <!-- ul>li>a{首页} -->
  2. <ul>
  3. <li><a href="">教程</a></li>
  4. <li><a href="">首页</a></li>
  5. <li><a href="">社区</a></li>
  6. </ul>
  7. <!-- 兄弟: + -->
  8. <!-- .class{title}+.class{url} -->
  9. <div class="title">title</div>
  10. <div class="url">url</div>

2.重复生成

  1. <!-- ul>li*3>a{首页} -->
  2. <ul>
  3. <li><a href="">首页</a></li>
  4. <li><a href="">首页</a></li>
  5. <li><a href="">首页</a></li>
  6. </ul>

3.按序号重复生成

  1. <!-- ul>li*3>a{item0$} 正序 -->
  2. <ul>
  3. <li><a href="">item01</a></li>
  4. <li><a href="">item02</a></li>
  5. <li><a href="">item03</a></li>
  6. </ul>
  7. <!-- ul>li*3>a{item$@3} 指定起始序号 -->
  8. <ul>
  9. <li><a href="">item3</a></li>
  10. <li><a href="">item4</a></li>
  11. <li><a href="">item5</a></li>
  12. </ul>
  13. <!-- ul#id{xuh}>li*3>a{itme$@-5} 指定序号倒序生成-->
  14. <ul id="xuh">
  15. <li><a href="">itme7</a></li>
  16. <li><a href="">itme6</a></li>
  17. <li><a href="">itme5</a></li>
  18. </ul>

4.emmet表格生成语法

table>caption{学生信息表}+(thead>tr>th{title}*8)+(tbody>tr*5>td{item}*8)

  1. <table>
  2. <caption>学生信息表</caption>
  3. <thead>
  4. <tr>
  5. <th>title</th>
  6. <th>title</th>
  7. <th>title</th>
  8. <th>title</th>
  9. <th>title</th>
  10. <th>title</th>
  11. <th>title</th>
  12. <th>title</th>
  13. </tr>
  14. </thead>
  15. <tbody>
  16. <tr>
  17. <td>item</td>
  18. <td>item</td>
  19. <td>item</td>
  20. <td>item</td>
  21. <td>item</td>
  22. <td>item</td>
  23. <td>item</td>
  24. <td>item</td>
  25. </tr>
  26. <tr>
  27. <td>item</td>
  28. <td>item</td>
  29. <td>item</td>
  30. <td>item</td>
  31. <td>item</td>
  32. <td>item</td>
  33. <td>item</td>
  34. <td>item</td>
  35. </tr>
  36. <tr>
  37. <td>item</td>
  38. <td>item</td>
  39. <td>item</td>
  40. <td>item</td>
  41. <td>item</td>
  42. <td>item</td>
  43. <td>item</td>
  44. <td>item</td>
  45. </tr>
  46. <tr>
  47. <td>item</td>
  48. <td>item</td>
  49. <td>item</td>
  50. <td>item</td>
  51. <td>item</td>
  52. <td>item</td>
  53. <td>item</td>
  54. <td>item</td>
  55. </tr>
  56. <tr>
  57. <td>item</td>
  58. <td>item</td>
  59. <td>item</td>
  60. <td>item</td>
  61. <td>item</td>
  62. <td>item</td>
  63. <td>item</td>
  64. <td>item</td>
  65. </tr>
  66. </tbody>
  67. </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