CSS 属性书写顺序
在 CSS 属性的书写过程中,建议遵循以下顺序:
1、布局定位属性
- dispaly
- position
- float
- clear
- visibility
- overflow
2、自身属性
- width
- height
- margin
- padding
- border
- background
3、文本属性
- color
- font
- text-decoration
- text-align
- vertical-align
- white-space
- break-word
4、其他属性(CSS 3)
- content
- cursor
- border-radius
- box-shadow
- text-shadow
- background:linear-gradient 等
转载自:https://segmentfault.com/a/1190000042107223