首页 > 代码库 > css3动画属性(transitions:property duration timing transition-delay)

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

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

1 p{  background:#000;2     -webkit-transition:background 1s linear;3     -moz-transition:background 1s linear;4     -o-transition:background 1s linear;5     -ms-transition:background 1s linear;6     transition:background 1s linear; }7 p:hover{ background: #f00; }

例题(2)

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