18反转

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>翻转18</title>
		<style>
			#test{
				width: 400px;
				height: 400px;
				position: absolute;
				margin-left: 100px;
				margin-top: 100px;
				perspective: 500px;
			}
			#test1{
				width: 400px;
				height: 400px;
				position: relative;
				transform-style: preserve-3d;
			}
			#div2{
				width: 400px;
				height: 400px;
				position: relative;
				background: lightcoral;
				-webkit-transition: all 1s;
			}
			#test #test1:hover #div2{
				-webkit-transform: rotateX(180deg);
			}
		</style>
	</head>
	<body>
		<div id="test">
			<div id="test1">
				<div id="div2"></div>
			</div>
		</div>
	</body>
</html>

  

posted @ 2020-11-27 08:26  卿家尘归尘  阅读(46)  评论(0编辑  收藏  举报