観覧車の効果を実現するcss3アニメーション

アニメーションに取り組んでおらず、効果が見られないことをお許しください
ここに画像の説明を挿入

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>摩天轮</title>
		<style>
			*{
    
    
				margin: 0;
				padding: 0;
			}
			
			.box{
    
    
				width: 500px;
				height: 500px;
				margin: 200px auto;
				position: relative;
				transform-origin: center;
				animation: gw 20s infinite linear;
			}
			@keyframes gw{
    
    
				from{
    
    
					transform: rotate(0deg);
				}
				to{
    
    
					transform: rotate(360deg);
				}
			}
			.box1{
    
    
				width: 130px;
				height: 170px;
				position: relative;
				margin: auto;
				margin-top: -470px;
				animation: b 20s infinite linear;
				transform-origin: top center;
			}
			.box2{
    
    
				width: 130px;
				height: 170px;
				position: relative;
				margin: auto;
				margin-top: 80px;
				margin-left: 385px;
				animation: b 20s infinite linear;
				transform-origin: top center;
			}
			.box3{
    
    
				width: 130px;
				height: 170px;
				position: relative;
				margin: auto;
				margin-top: -100px;
				margin-left: 20px;
				animation: b 20s infinite linear;
				transform-origin: top center;
			}
			@keyframes b{
    
    
				from{
    
    
					transform: rotate(0deg);
					
				}
				to{
    
    
					transform: rotate(-360deg);
				}
			}
		</style>
	</head>
	<body>
		<div class="box">
			<img src="img/fsw.png" width="500px" height="500px">
			<div class="box1">
				<img src="img/boy.png" width="120px" height="150px">
			</div>
			<div class="box2">
				<img src="img/girl.png" width="120px" height="150px">
			</div>
			<div class="box3">
				<img src="img/shamegirl.png" width="120px" height="150px">
			</div>
		</div>
	</body>
</html>

写真は私が見つけることができます、またはあなたは写真を背景色に置き換えることができます、私はここでc3アニメーションのアイデアを提供します

おすすめ

転載: blog.csdn.net/GongWei_/article/details/112171206