Blogger Information
Blog 13
fans 0
comment 0
visits 9828
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
VSCode安装使用与Emmet语法
樱风醉
Original
931 people have browsed it

一.VScode安装与常用插件

  1. 选择官网下载安装vscode编辑器
    https://code.visualstudio.com/
  2. 搜索下载需要的插件和主题
    效果如图:
  3. 其他问题
  • 更改默认格式化程序,由Prettier-Code formatter格式化代码
  • 解决vscode中emmet中对行内标签不换行的问题

二.Emmet语法

1.快速生成html5文档结构

!+tab

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  7. <title>Document</title>
  8. </head>
  9. <body></body>
  10. </html>

2.id和class
#+id名称
#content

  1. <div id="content"></div>

.+class名称

.main

  1. <div class="main"></div>

3.层级
子元素用>
div>p>a

  1. <div>
  2. <p><a href=""></a></p>
  3. </div>

兄弟元素用+
div+p+a

  1. <div></div>
  2. <p></p>
  3. <a href=""></a>

父级元素用^
div>p^a

  1. <div>
  2. <p></p>
  3. </div>
  4. <a href=""></a>

4.重复*n

>ul>li*5>a

  1. <ul>
  2. <li><a href=""></a></li>
  3. <li><a href=""></a></li>
  4. <li><a href=""></a></li>
  5. <li><a href=""></a></li>
  6. <li><a href=""></a></li>
  7. </ul>

5.序号

ul>li.item$*5>a{link$@6}

  1. <ul>
  2. <li class="item1"><a href="">link6</a></li>
  3. <li class="item2"><a href="">link7</a></li>
  4. <li class="item3"><a href="">link8</a></li>
  5. <li class="item4"><a href="">link9</a></li>
  6. <li class="item5"><a href="">link10</a></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