css3动画属性(transitions:property duration timing transition-delay)

时间:2024-01-11 09:25:38

transitions:property duration timing-function;
transitionst他有三个参数:
1)
property:属性设置,例如background,color等。
2)
duration:执行时间, 例如1s, 0.5s等。
3)
timing-function:动画种类, 例如linear 渐变
等。
4) transition-delay:延迟时间。
例题(1):

 p{  background:#000;
-webkit-transition:background 1s linear;
-moz-transition:background 1s linear;
-o-transition:background 1s linear;
-ms-transition:background 1s linear;
transition:background 1s linear; }
p:hover{ background: #f00; }

例题(2)

 transition-property:background;
transition-duration:1s;
transition-timing-funcion:linear;
transition-delay:1s