标签:code || use func set dir rom pause css
@keyframes 关键帧 ——> animation 活泼 (配合使用)
transform 变换 ——> transition 过渡 (配合使用)
animation : name,完成时间,速度曲线,延迟时间,播放次数,轮流反向播放动画
animation : name,5s,linear,infinite
扩展
animation-fill-mode:forwards 让动画保持在最后一帧
animation-play-state:paused; 让动画在当前帧停止
transition: 属性名||all,完成时间,速度曲线,延迟时间;
transition: all 5s linear;
rotate 旋转,scale缩放,skew倾斜,translate移动
box-shadow:5px 5px 5px 5px red outset;
.d1{
animation: mymove 5s linear 1s infinite alternate;
-webkit-animation: mymove 5s linear 1s infinite alternate;
/*执行动画mymove 5s内完成 动画从头到尾的速度是相同的 无限次播放 回来时反向*/
}
@keyframes mymove
{
0% {top:0px;}
100% {top:200px;}
}
@-webkit-keyframes mymove /* Safari 和 Chrome */
{
from {top:0px;}
to {top:200px;}
}
.d1{
width: 206px;
height: 206px;
background: pink;
}
.d1{
transform: rotate(0deg);
transition: all 3s linear;
}
.d1:hover{
transform: rotate(360deg);
}
标签:code || use func set dir rom pause css
原文地址:https://www.cnblogs.com/hyx626/p/9786970.html