感谢您的支持,我会继续努力的!
打开微信扫一扫,即可进行扫码打赏哦
点我查看本站打赏源码!
Powered by RUNCODEX.COM,学的不仅是技术,更是梦想!!!
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>animation 属性</title>
</head>
<body>
<h1>animation 属性</h1>
<div class="animation1">1、from~to </div>
<br/>
<div class="animation2">2、0%~100% </div>
<div class="animation3">3、timing-function </div>
<div class="animation4">4、direction </div>
</body>
</html>
输入 JavaScript 代码……
xxxxxxxxxx
div{
width: 100px;
height: 30px;
background: red;
border-radius: 20px;
}
@keyframes mymove1
{
from {left:0px;}
to {left:500px;}
@keyframes mymove2
0% {left:0px;}
25% {left:200px;}
50% {left:500px;}
75% {left:200px;}
100% {left:0px;}
@keyframes mymove3
@keyframes mymove4
0% {background:red; left:0px; top:0px; width:100px;}
25% {background:yellow; left:200px; top:0px; width:200px;}
50% {background:brown; left:200px; top:200px; width:200px;}
75% {background:green; left:0px; top:200px; width:100px;}
100% {background:red; left:0px; top:0px; width:100px;}
.animation1 {
position:relative;
animation: mymove1 5s infinite;
.animation2 {
animation: mymove2 5s infinite;
.animation3 {
animation: mymove3 5s ease-in infinite;
.animation4 {
animation: mymove4 5s infinite alternate;