<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
@keyframes move {
0% {}
70% {
/* border-radius: 6% 6% 6% 6%*/
transform: translate(0, 12px)
}
100% {
transform: translate(0, 0px)
/* border-radius: 3% 3% 3% 3%*/
}
}
div {
margin: 0 auto
}
span {
display: inline-block
height: 200px
width: 25px
background-color: red
animation: move 1.4s infinite
}
</style>
</head>
<body>
<div id="spanbox">
</div>
<script>
// 建议最多280
var jxd=280
var spanbox=document.getElementById('spanbox')
var childDom=null
for (var i=0i<jxdi++){
childDom=document.createElement('span')
childDom.style.animationDelay=parseFloat(1.4/jxd*i)+'s'
childDom.style.width=parseFloat(350/jxd)+'px'
spanbox.appendChild(childDom)
}
</script>
</body>
</html>
如果需要更高的精细度修改变量jxd为14的倍速,
你现在空间的代码imgsrc.baidu.com/css/pic/item/af780743aad7bb1d9313c616.jpg改成http://www.dqzhaoyi.com/pic/070015/01.gif