移动端(video) transformOringe addEventListener

时间:2022-07-28
本文章向大家介绍移动端(video) transformOringe addEventListener,主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
	<style type="text/css">
		*{margin: 0;padding: 0;list-style: none;}
div{width: 200px;height: 200px;background: black;position: absolute;left: 50%;top: 50%;margin: -100px 0 0 -100px;
	transition:.3s;
	-transform-origin:right top;
	transform-origin:left center;
}


	</style>
</head>
<body>
	<div id="div1"></div>
	<script type="text/javascript">
		var reg=0;
		setInterval(function()
			{
				reg++;
				div1.style.transform="perspective(50px) rotateY("+reg+"deg)";

			},0);
	</script>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
	<style type="text/css">
		*{margin: 0;padding: 0;list-style: none;}
div{
	width: 100px;height: 100px;background: black;
}
	</style>
</head>
<body>
	<div id='div1'></div>
	<script type="text/javascript">
		/*addEventListener("load",function()
			{
				alert(1);
			},false);
		addEventListener("load",function()
			{
				alert(2);
			},false);
*/
			/*function show()
			{
				alert(1);
				div1.removeEventListener("click",show);
			}
			div1.addEventListener("click",show,false);
			*/
		
	</script>
</body>
</html>