background/font/animation属性的顺序

本文详细介绍了CSS中background和font属性的正确书写顺序,并深入探讨了animation属性的使用方法,包括动画的命名、持续时间、动画方式等关键参数。

background属性的顺序

  1. background-color;
  2. background-image;
  3. background-repeat;
  4. background-attachment;
  5. background-position;
  6. 其他还有background-size; background-clip; background-origin 单独写出来就行;

font属性的顺序

  1. font-style;
  2. font-family;
  3. font-weight;
  4. font-size/line-height;
  5. font-family;

animation

animation: 动画名 持续时间 动画方式 延时 重复次数 是否交替;
animation: move 4s cubic-bezier(0.5,0.9,0.5,0.1) 0s infinite alternate;
动画:name duration 动画方式 delay 次数 是否重复;

初始状态(同animation同级)相当于animation的0%;
cubic-bezier(x1,y1,x2,y2) 相当于定义开始和结束的斜率
动画方式:ease ease-in ease-out ease-in-out linear cubic-bezier(x1,y1,x2,y2);
animation-name\ animation-duration\ animation-timing-function\ animation-delay\ animation-iteration-count\ animation-direction

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值