摘要:
安裝請看上一篇Sublime Text—安裝,和sublime自備快捷鍵一起用,寫html簡直快的飛起。
下面整理的是常用的,完整的可看emmet官方文件。
產生標籤
1.快速產生文件結構
#!
或html:5
,快速產生HTML5 結構(都需要再按tab鍵)
nbsp;html> <meta> <title>Document</title>
html:xt
產生HTML4 過渡型html:4s
產生HTML4 嚴格類型
p#header
<p></p>3.產生帶
class 的元素
標籤. 類別名,如:p.title
<p></p>4.產生後代元素:>如:
nav>ul>li
<nav> <ul> <li> </ul> </nav>5 .產生兄弟元素:+如:
p+p+p
<p></p> <p></p> <p></p>6.產生上級元素:^#如:
p^p
<p></p> <p></p>7.重複產生多個元素:*
如:
ul>li*5
-
-
-
-
-
8.產生帶自定義屬性:[attr]
如:p[value=1]
<p></p>9.產生帶文字內容:{}如:
a{Click me}
<a>Click me</a>10.加編號:$
- 從1開始:加$
p.item${$$}*3#
<p>01</p> <p>02</p> <p>03</p>
- 倒序: $ 後面增加@-
p.item$@-{$$@-}*3#
<p>03</p> <p>02</p> <p>01</p>
- ##指定序號:可以使用@N
- 如:
<pre class="brush:php;toolbar:false"><p>04</p>
<p>05</p>
<p>06</p></pre>
11.
:()如:
(ul>ol)*3<pre class="brush:php;toolbar:false"></pre>
<ul>
</ul>
<ol></ol>
<ul>
</ul>
<ol></ol>
<ul>
</ul>
<ol></ol>
來個
table#tab[value=1].a>tr*3>(td{$$}>span)*3
<pre class="brush:php;toolbar:false"></pre>
<table>
<tr>
<td>01<span></span>
</td>
<td>02<span></span>
</td>
<td>03<span></span>
</td>
</tr>
<tr>
<td>01<span></span>
</td>
<td>02<span></span>
</td>
<td>03<span></span>
</td>
</tr>
<tr>
<td>01<span></span>
</td>
<td>02<span></span>
</td>
<td>03<span></span>
</td>
</tr>
</table>
產生css
css樣式多,縮寫自然也很多,列舉常用的舉一反三即可。
其中css縮寫是採用模糊搜尋匹配的,例如ov:h == ov-h == ovh == oh。
- w10
width
: 10px;<a href="http://www.php.cn/wiki/835.html" target="_blank"> w10p </a>width: 10%;
w10ewidth: 10em;
w10xwidth: 10xe;
#h10 -
height
: 10px;<a href="http://www.php.cn/wiki/836.html" target="_blank"></a>
#por position
: relative;<a href="http://www.php.cn/wiki/902.html" target="_blank"> poa </a>position: absolute;
fll float
: left;<a href="http://www.php.cn/wiki/919.html" target="_blank"> fr </a>float:
right;<a href="http://www.php.cn/wiki/905.html" target="_blank"></a>
dt display
: table;<a href="http://www.php.cn/wiki/927.html" target="_blank"> db </a>display: block;
dibdisplay: inline-block;
ovy overflow-y
: hidden;<a href="http://www.php.cn/wiki/926.html" target="_blank"></a>
cb -
clear
: both;<a href="http://www.php.cn/wiki/917.html" target="_blank"></a>
mt margin-top
: ;<a href="http://www.php.cn/wiki/933.html" target="_blank"> mb </a>
margin-bottom: ;<a href="http://www.php.cn/wiki/935.html" target="_blank"></a>
pt
<a href="http://www.php.cn/wiki/949.html" target="_blank">padding-top</a>: ;
pb<a href="http://www.php.cn/wiki/951.html" target="_blank">padding-bottom</a>: ;
tac
<a href="http://www.php.cn/wiki/870.html" target="_blank">text-align</a>: center;
lh
<a href="http://www.php.cn/wiki/864.html" target="_blank">line-height</a>:;
tsn
<a href="http://www.php.cn/wiki/861.html" target="_blank">text-shadow</a>: none;
tja
<a href="http://www.php.cn/wiki/881.html" target="_blank">text-justify</a>: auto;
c
color: #000;
crcolor: rgb(0, 0, 0);
cracolor: rgba(0, 0, 0, .5);
op
opacity: ;
cnt
content: '';
ol
<a href="http://www.php.cn/wiki/938.html" target="_blank">outline</a>: ;
bd+
border: 1px solid #000;
bdb+border-bottom: 1px solid #000;
bd2px#333s
border: 2px #333 solid;
快捷键
如果没作用请检查快捷键是否冲突
快速生成包裹标签:Ctrl+Shift+G
只有文本没有结构时,如下
首页 简介 动态
选中文本按快捷键Ctrl+Shift+G,再弹出的:Enter Wrap Abbreviation(输入扩展缩写)中输入nav>ul>li.item$*>a
就会生成
<nav> <ul> <li><a>首页</a></li> <li><a>简介</a></li> <li><a>动态</a></li> </ul> </nav>
如果原先的文本带编号,不想要则可以在上面的基础上加|t
,nav>ul>li.item$*>a|t
即可生成如上结果。
1首页 2简介 3动态
自动添加/更新图片尺寸:ctrl+U
光标移到标签上的任意位置,按下快捷键ctrl+U
即可。
<img src="/static/imghwm/default1.png" data-src="img/x1.png" class="lazy" alt="詳解Sublime Text 外掛程式Emmet的使用" > <img src="/static/imghwm/default1.png" data-src="img/x1.png" class="lazy" alt="詳解Sublime Text 外掛程式Emmet的使用" >
删除标签:shift+ctrl+;
定位到上个编辑点:ctrl+alt+left
定位到下个编辑点:ctrl+alt+right
选中下一项:shift+ctrl+.
加/减1:ctrl+up/ctrl+down
加/减10:shift+alt+up/shift+alt+down
展开缩写:ctrl+e(和tab键作用相同)
重命名标签(rename_tag):ctrl+shift+'
更换标签(update_as_you_type):ctrl+Shift+U
匹配标签对:ctrl+alt+j
生成测试文本
输入lorem
再按tab会随机生成一段英文,默认是生成30个单词,可以加上数字控制单词数量,如lorem5
。
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Perferendis incidunt, expedita voluptates ratione praesentium error a accusamus corporis deleniti. Cum, debitis id, in rem exercitationem at voluptatum illum minima corporis!
Lorem ipsum dolor sit amet.
以上是詳解Sublime Text 外掛程式Emmet的使用的詳細內容。更多資訊請關注PHP中文網其他相關文章!

HTMLISNOTAPROGRAMMENGUAGE; ITISAMARKUMARKUPLAGUAGE.1)htmlStructures andFormatSwebContentusingtags.2)itworkswithcsssforstylingandjavascript for Interactivity,增強WebevebDevelopment。

HTML是構建網頁結構的基石。 1.HTML定義內容結構和語義,使用、、等標籤。 2.提供語義化標記,如、、等,提升SEO效果。 3.通過標籤實現用戶交互,需注意表單驗證。 4.使用、等高級元素結合JavaScript實現動態效果。 5.常見錯誤包括標籤未閉合和屬性值未加引號,需使用驗證工具。 6.優化策略包括減少HTTP請求、壓縮HTML、使用語義化標籤等。

HTML是一種用於構建網頁的語言,通過標籤和屬性定義網頁結構和內容。 1)HTML通過標籤組織文檔結構,如、。 2)瀏覽器解析HTML構建DOM並渲染網頁。 3)HTML5的新特性如、、增強了多媒體功能。 4)常見錯誤包括標籤未閉合和屬性值未加引號。 5)優化建議包括使用語義化標籤和減少文件大小。

WebDevelovermentReliesonHtml,CSS和JavaScript:1)HTMLStructuresContent,2)CSSStyleSIT和3)JavaScriptAddSstractivity,形成thebasisofmodernWebemodernWebExexperiences。

HTML的作用是通過標籤和屬性定義網頁的結構和內容。 1.HTML通過到、等標籤組織內容,使其易於閱讀和理解。 2.使用語義化標籤如、等增強可訪問性和SEO。 3.優化HTML代碼可以提高網頁加載速度和用戶體驗。

htmlisaspecifictypefodyfocusedonstructuringwebcontent,而“代碼” badlyLyCludEslanguagesLikeLikejavascriptandPytyPythonForFunctionality.1)htmldefineswebpagertuctureduseTags.2)“代碼”代碼“ code” code code code codeSpassSesseseseseseseseAwiderRangeLangeLangeforLageforLogageforLogicIctInterract

HTML、CSS和JavaScript是Web開發的三大支柱。 1.HTML定義網頁結構,使用標籤如、等。 2.CSS控製網頁樣式,使用選擇器和屬性如color、font-size等。 3.JavaScript實現動態效果和交互,通過事件監聽和DOM操作。

HTML定義網頁結構,CSS負責樣式和佈局,JavaScript賦予動態交互。三者在網頁開發中各司其職,共同構建豐富多彩的網站。


熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

AI Hentai Generator
免費產生 AI 無盡。

熱門文章

熱工具

SublimeText3漢化版
中文版,非常好用

Atom編輯器mac版下載
最受歡迎的的開源編輯器

VSCode Windows 64位元 下載
微軟推出的免費、功能強大的一款IDE編輯器

禪工作室 13.0.1
強大的PHP整合開發環境

DVWA
Damn Vulnerable Web App (DVWA) 是一個PHP/MySQL的Web應用程序,非常容易受到攻擊。它的主要目標是成為安全專業人員在合法環境中測試自己的技能和工具的輔助工具,幫助Web開發人員更好地理解保護網路應用程式的過程,並幫助教師/學生在課堂環境中教授/學習Web應用程式安全性。 DVWA的目標是透過簡單直接的介面練習一些最常見的Web漏洞,難度各不相同。請注意,該軟體中