1.输入html:5,然后按tab键或enter键,效果如下:
1 2 3 4 5 6 7 8 9 10 11 12
| <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> </head> <body> </body> </html>
|
2.输入link:css引入css样式文件,输入script:src引入js
1 2 3 4
| <link rel="stylesheet" href="">
<script src=""></script>
|
3.输入标签名自动补齐
1 2 3 4
| <h1></h1>
<h2>填充文本</h2>
|
4.随机文本的输入
1 2 3 4 5 6 7 8
| Lorem ipsum dolor sit amet consectetur adipisicing elit. At illum doloremque accusantium est, expedita tenetur minus nostrum perspiciatis. Repudiandae voluptatum mollitia corrupti adipisci pariatur accusantium praesentium quas, quisquam tempore debitis?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Commodi, dolorem.
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Nihil, debitis. Sit accusamus nisi mollitia doloremque cumque praesentium quod velit vitae. Quisquam qui ipsam beatae eaque non voluptatibus obcaecati voluptate exercitationem.
|
5.使用"#“输入id,”.“输入class,”[]"输入属性
1 2 3 4 5
| <div id="main" class="content"></div> <div id="foot" class="foot" data="结束"></div>
<div alt="到底了">结束</div>
|
6.使用">“输入嵌套标签,”+" 输入并列的兄弟标签,"^"上级元素
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
| <div> <div id="imgs">put some imgs here</div> </div>
<div id="left">I am left</div> <div id="right">I am right</div>
<div id="div1"> <p></p> </div> <div id="div2"></div>
<div> <div id="div1"> <p></p> </div> <div id="div2"></div> </div>
<div> <p><img src="" alt=""></p> <div> <ul> <li></li> </ul> </div> </div>
<div> <div> <div></div> </div> <div></div> </div>
<div> <div></div> </div> <div></div>
|
7.使用"()“对标签分组及使用”*"生成多个相同的标签
1 2 3 4 5 6 7 8 9 10 11 12 13
| <div id="list1"> <ul> <li></li> <li></li> </ul> </div> <div id="list1"> <ul> <li></li> <li></li> </ul> </div>
|
8.自增符号$
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
<ul> <li><img src="./imgs/1.jpg" alt="img 1"></li> <li><img src="./imgs/2.jpg" alt="img 2"></li> <li><img src="./imgs/3.jpg" alt="img 3"></li> </ul>
<ul> <li><img src="./imgs/001.jpg" alt="img 001"></li> <li><img src="./imgs/002.jpg" alt="img 002"></li> <li><img src="./imgs/003.jpg" alt="img 003"></li> </ul>
<ul> <li><img src="./imgs/04.jpg" alt="img 04"></li> <li><img src="./imgs/05.jpg" alt="img 05"></li> <li><img src="./imgs/06.jpg" alt="img 06"></li> </ul>
|
参考链接:
VSCode编辑器使用技巧:快捷输入HTML代码_慕课手记