file html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="box">
<span style="--i:0;"></span>
<span style="--i:1;"></span>
<span style="--i:2;"></span>
<span style="--i:3;"></span>
<span style="--i:4;"></span>
<span style="--i:5;"></span>
<span style="--i:6;"></span>
<span style="--i:7;"></span>
</div>
</body>
</html>
file css
*
{
margin: 0;
padding: 0;
box-sizing: border-box;
}
body
{
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background:black;
overflow: hidden;
}
.box
{
position: relative;
width: 500px;
height: 500px;
}
.box span
{
position: absolute;
inset: 0;
transform: rotate(calc(45deg * var(--i)));
}
.box span::before
{
content: '';
position: absolute;
left: 50%;
width: 250px;
height: 300px;
background: url(photo_٢٠٢٢-٠٥-١١_١٨-١٨-٢١.jpg);
background-size: cover;
background-position: center;
transform: translateX(-50%) translateY(-100px)
scale(0.75);
animation: animate 2s steps(1) infinite;
animation-delay: calc(0.1s * var(--i));
}
@keyframes animate
{
0%,100%
{
background: url(photo_٢٠٢٢-٠٥-١١_١٨-١٨-٢١.jpg);
}
50%
{
background: url(photo_٢٠٢٢-٠٥-١١_١٨-١٨-٢٢.jpg);
}
}
output
download image: