var left = 500;
var styleStr = `
.progress {
-webkit-animation-name: progress;
animation-name: progress;
width:200px;
height:200px;
background:green;
z-index:9999;
position:absolute
}
@keyframes progress {
0% {
left:${left}px;
top:10px;
}
10%,
20% {
left:100px;
top:10px;
}
30%,
50%,
70%,
90% {
left:10px;
top:100px;
}
40%,
60%,
80% {}
100% {
left:500px;
top:10px;
}
}
`
var style = document.createElement('style')
style.innerHTML = styleStr;
document.querySelector("head").appendChild(style)