CSS属性书写顺序

建议遵循以下顺序:

1.布局定位属性:display  position  float  clear  visibility  overflow(建议display第一个写,毕竟关系到模式)

2.自身属性:width  height  margin  padding  border  background

3.文本属性:color  font  text-decoration  text-align  vertical-align  white-space  break-word

4.其他属性(CSS3):content  cursor  border-radius  box-shadow  text-shadow  background:linear-gradient...

posted @ 2022-07-24 19:18  每日一小步  阅读(76)  评论(0编辑  收藏  举报