zen coding

1。初始化

  • html:5 or ! for an HTML5 doctype
  • html:xt for an XHTML transitional doctype
  • html:4s for an HTML4 strict doctype

2,id ,class,attribute,text

p#foo,p.bar,p[href="http://dd"],p{1234}

3 嵌套

>子节点,+邻节点,^(可连续多个)向上一级邻节点(div>p>a>span^^^p)

nesting

4,扩展

*数字 ul>li*3

multiplication

5 数字索引

$,ul>li.item$*3

$numbering

6 CSS属性缩写

bdr,bgi, lh,dn,ov-s

values

h10p+m5e,p → %,e → em,x → ex,不写冒号直接跟值的时候能自动补充单位,如:border-left3;m10p30e5x → margin: 10% 30em 5ex

7渐变

gradient

8假文

lorem10

lorem

posted @ 2015-04-20 10:22  lf001  阅读(113)  评论(0)    收藏  举报