Loading

CSS属性编写顺序


1)显示属性:

1 display || visibility
2 list-style : list-style-type || list-style-position || list-style-image
3 position
4 top || right || bottom || left
5 z-index 
6 clear 
7 float

 

2)自身属性:

1 width max-width || min-width
2 height max-height || min-height
3 overflow || clip
4 margin : margin-top || margin-right || margin-bottom || margin-left
5 padding : padding-top || padding-right || padding-bottom || padding-left
6 outline : outline-color || outline-style || outline-width
7 border
8 background : background-color || background-image || background-repeat || background-attachment || background-position

 

3)文本属性:

 1 color
 2 font : font-style || font-variant || font-weight || font-size || line-height ||font-family
 3 font : caption | icon | menu | message-box | small-caption | status-bar
 4 text-overflow
 5 text-align
 6 text-indent
 7 line-height
 8 white-space
 9 vertical-align
10 cursor 

 

4)CSS3属性:

transform/transition/animation/box-shadow/border-radius

 

5)如果使用CSS3的属性,如果有必要加入浏览器前缀,则按照
-webkit- / -moz- / -ms- / -o- / std的顺序进行添加,标准属性写在最后。

链接的样式请严格按照如下顺序添加:

a:link -> a:visited -> a:hover -> a:active

 

posted @ 2015-09-28 17:02  狂扫一条街  阅读(241)  评论(0编辑  收藏  举报