css属性书写先后顺序
只遵循横向顺序即可,先显示定位布局类属性,后盒模型等自身属性,最后是文本类及修饰类属性。
→ | 显示属性 | 自身属性 | 文本属性和其他修饰 |
---|---|---|---|
display | width | font | |
visibility | height | text-align | |
position | margin | text-decoration | |
float | padding | vertical-align | |
clear | border | white-space | |
list-style | overflow | color | |
top | min-width | background |
定位布局属性:
display----visibility
position---float---clear
list-style
盒模型属性:
width --- height
margin --- padding --- border
overflow
文本及修饰属性:
color --- font --- background
text-align---vertical-align
text-decoration
参考文献:
http://nec.netease.com/standard/css-format.html
http://www.cnblogs.com/laihuayan/archive/2012/07/27/2611111.html
http://www.w3school.com.cn/cssref/index.asp
http://blog.youkuaiyun.com/besttoby01/article/details/75095232