css书写顺序

火狐推荐的CSS书写顺序

/* mozilla.org Base Styles
 * maintained by fantasai
 * (classes defined in the Markup Guide - http://mozilla.org/contribute/writing/markup )
 */
/* Suggested order:
 * display
 * list-style
 * position
 * float
 * clear
 * width
 * height
 * margin
 * padding
 * border
 * background
 * color
 * font
 * text-decoration
 * text-align
 * vertical-align
 * white-space
 * other text
 * content
 *
 */

  

1.显示属性:display||visibility||list-style(list-style-type、list-style-image、list-style-position)||overflow

2.定位及浮动属性:position||top||right||bottom||left||float||clear

3.盒模型:width||height||margin||padding||border

4.背景:background(background-image、background-position、background-repeat、background-attachment)

5.文字属性:font-style||font-variant||font-weight||font-size||font-family||color

6.文本属性:text-indent||text-align||vertical-align||letter-spacing||word-spacing||text-transform||text-decoration||text-shadow

posted @ 2012-01-12 11:53  陈大脑袋  阅读(180)  评论(0编辑  收藏  举报