background-position鱼游动特效是一款基于css3 animation transform属性制作两条游动的鲨鱼动画特效。
相关CSS3代码
@keyframes active1 {
0%{
}
100%{
background-position: left -1008px;
}
}
@keyframes active2 {
0%{
}
100%{
background-position: left -2160px;
}
}
@keyframes run {
0%{
}
15%{
transform:translate(600px,0px) rotate(45deg) ;
}
50%{
transform:translate(600px,350px) rotate(135deg) ;
}
75%{
transform:translate(50px,300px) rotate(235deg);
}
100%{
transform:translate(0px,0px) rotate(360deg) ;
}
}
@keyframes run2{
0%{
transform:translateX(-600px);
}
100%{
transform:translateX(2000px);
}
}