他的官网:http://docs.emmet.io/
给广大程序员节省时间
#page>div.logo+ul#navigation>li*5>a{Item $}
生产
<div id="page">
<div class="logo"></div>
<ul id="navigation">
<li><a href="">Item 1</a></li>
<li><a href="">Item 2</a></li>
<li><a href="">Item 3</a></li>
<li><a href="">Item 4</a></li>
<li><a href="">Item 5</a></li>
</ul>
</div>
样式也牛逼:margin: 10ex 20em;
,m10ex-5
→margin: 10ex -5px;
.
Value aliases
Emmet has a few aliases for commonly used values:
-
p
→%
-
e
→em
-
x
→ex
You can use aliases instead of full units:
-
w100p
→width: 100%
-
m10p30e5x
→margin: 10% 30em 5ex
Color values
Emmet supports hex color values, like this: c#3
→ color: #333;
. The #
sign is a value separator so you don’t need to use hyphen to separate it. For example, bd5#0s
expands to border: 5px #000 solid
: the #
sign separates color from 5
and since s
(alias to solid
) is not a hexadecimal character, it can be used without-
value separator.
You can write one, two, three or six characters as color value:
-
#1
→#111111
-
#e0
→#e0e0e0
-
#fc0
→#ffcc00