例:vs code 中输入 div.list>div.item_$*6 摁下回车键就会生成如下代码
<div class="list"> <div class="item_1"></div> <div class="item_2"></div> <div class="item_3"></div> <div class="item_4"></div> <div class="item_5"></div> <div class="item_6"></div> </div>
类名 .
输入 div.wrapper
<div class="wrapper"></div>
id #
div#wrapper
<div id="wrapper"></div>
属性 []
span[title="test"]
<span title="test"></span>
后代 >
div>span>a
<div><span><a href=""></a></span></div>
兄弟 +
div+p+span
<div></div> <p></p> <span></span>
上级 ^
div>span^i
<div><span></span></div> <i></i>
乘法 *
ul>li*2
<ul> <li></li> <li></li> </ul>
文本 {}
div>span{this is test}
<div><span>this is test</span></div>
自增符 $
ul>li.list_${list $}*3
<ul> <li class="list_1">list 1</li> <li class="list_2">list 2</li> <li class="list_3">list 3</li> </ul>
ul>[email protected]*3 “@3” (表示从3开始计数)
<ul> <li class="item3">list 1</li> <li class="item4">list 2</li> <li class="item5">list 3</li> </ul>
隐式转换
.class
<div class="class"></div>
ul>.item
<ul> <li class="item"></li> </ul>
table>.row>.col
<table> <tr class="row"> <td class="col"></td> </tr> </table>
! 基本html标签
<!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>
原文地址:https://www.cnblogs.com/suitongyu/p/12043791.html
时间: 2024-11-09 03:57:40