【规范】css

声明顺序

为了保证更好的可读性,我们应该遵循以下顺序:

  1. 定位:position | z-index | top | right | bottom | left | clip
  2. 布局:display | float | clear | visibility | overflow | overflow-x | overflow-y
  3. 尺寸:width | min-width | max-width | height | min-height | max-height
  4. 外边距:margin | margin-top | margin-right | margin-bottom | margin-left
  5. 内边距:padding | padding-top | padding-right | padding-bottom | padding-left
  6. 边框:border | border-top | border-right | border-bottom | border-left | border-radius | box-shadow | border-image
  7. 背景:background | background-color | background-image | background-repeat | background-attachment | background-position | background-origin | background-clip | background-size
  8. 颜色:color | opacity
  9. 字体:font | font-style | font-variant | font-weight | font-size | font-family
  10. 文本:text-transform | white-space | word-break | word-wrap | overflow-wrap | text-align | word-spacing | letter-spacing | text-indent | vertical-align | line-height
  11. 文本修饰:text-decoration | text-shadow
  12. 书写模式:direction | unicode-bidi | writing-mode
  13. 列表:list-style | list-style-image | list-style-position | list-style-type
  14. 表格:table-layout | border-collapse | border-spacing | caption-side | empty-cells
  15. 内容:content | counter-increment | counter-reset | quotes
  16. 用户界面:appearance | text-overflow | outline | outline-width | outline-color | outline-style | outline-offset | cursor | zoom | box-sizing | resize | user-select
  17. 多列:columns | column-width | column-count | column-gap | column-rule | column-rule-widthcolumn-rule-style | column-rule-color | column-span | column-fill | column-break-before | column-break-after | column-break-inside
  18. 伸缩盒:flex
  19. 变换,过渡,动画:transform | transition | animation

转载于:https://www.cnblogs.com/TangYR168/p/6362081.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值