<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>huandneg</title>
<script>
var flag = 1;
var contral;
function sho() {
var sho = document.getElementById("sho");
switch(flag) {
case 1:
sho.src = "img/H5动画-向上展开.png";
flag++;
break;
case 2:
sho.src = "img/H5动画-向上飞入.png";
flag++;
break;
case 3:
sho.src = "img/H5动画-弹性放大.png";
flag = 1;
break;
}
contral = setTimeout("sho()",1000);
}
function stop(){
clearTimeout(contral);
}
</script>
</head>
<body onload="sho()">
<img id="sho" style="width: 200px;" onmousemove="stop()" onmouseout="sho()" />
</body>
</html>
![](https://img-blog.csdn.net/20180630211505129?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQyMTA4NDg3/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70)