实现旋转木马效果

实现旋转木马效果

<!DOCTYPE html>
<html>
<head>
	<title></title>
	<style type="text/css">
		.body {

		}
		.main {
			perspective: 2000px;
			width: 360px;
			height: 240px;
			margin: 250px auto;
			position: relative;
 		}
		.imgList {
			/*width: 360px;
			height: 240px;*/
			position: relative;
			transform-style: preserve-3d;
			animation: rotate linear infinite 10s;
		}
		@keyframes rotate {
			100% {
				transform: rotateY(360deg);
			}
		}
		img {
			-webkit-box-reflect: below 5px
			-webkit-linear-gradient(transparent 10%, rgba(255, 255, 255, 0.3));
			width: 360px;
			height: 240px;
			position: absolute;
			left: 0;
			top: 0;
		}
		img:nth-of-type(1) {
			transform: translateZ(360px);
		}
		img:nth-of-type(2) {
			transform: rotateY(120deg) translateZ(360px);
		}
		img:nth-of-type(3) {
			transform: rotateY(240deg) translateZ(360px);
		}
	</style>
</head>
<body>
	<div class="body">
		<div class="main">
			<div class="imgList">
				<img src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2F1115%2F092621094155%2F210926094155-9-1200.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1662862881&t=5a974f2ec591e96172878936fc59ef84">

				<img src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2F1114%2F0Z320111T2%2F200Z3111T2-4-1200.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1662862881&t=b8630669de330283c55c082df4e750c2">

				<img src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.jj20.com%2Fup%2Fallimg%2F1113%2F0F420110430%2F200F4110430-11-1200.jpg&refer=http%3A%2F%2Fimg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1662862881&t=6507112020043ca1cbf5046df8cd40a0">
				
			</div>
		</div>
	</div>
	
</body>
</html>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值