首页幻灯轮播 - HTML



<!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>

猜你喜欢

转载自blog.csdn.net/qq_42108487/article/details/80869981
今日推荐