您的位置:首页 > 其它

from zen coding to Emmet

2015-08-21 16:38 337 查看

History

Zen coding
a speedy way of writing HTML codes using CSS-like selector like syntax. It’s originally proposed by Vadim Makeev, 2008, being famous after matured by Sergey Chikuyonok, 2009. It then evolved into
Emmet
, 2013
.

A simple example

The following code:

[code]div#content>h1+p


generates:

[code]<div id="content">
<h1></h1>
<p></p>
</div>


Basic usage

document

html:5
or
!


easy add

class,
.


id,
#


text,
{}


attribute,
[]


nesting

child,
>


sibling,
+


upper level,
^


grouping,
()


implicit tag names[1]

default,
div


li
for
ul
and
ol


tr
for
table
,
tbody
,
thead
and
tfoot


td
for
tr


option
for
select
and
optgroup


multiplication,
*


numbering,
$


lorem
or
lipsum


lorem
N will generate N random words.

Emmet is intelligent to guess the tag name omited. For example,
.item
in
<ul>
will generate
<li class="item"></li>
.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: