css样式书写顺序

这里推荐先写显示属性,再写自身属性,再写文字属性;并不代表非得按这个顺序写,但这种写法可以使css结构更清晰易读,修改起来比较方便。

而且在团队项目中能更好地提高效率。
//显示属性
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

原文地址:https://www.cnblogs.com/nefertari/p/3576749.html