<div class="gallery">
<img src="https://picsum.photos/id/104/400/400" alt="a dream catcher">
<img src="https://picsum.photos/id/1082/400/400" alt="a piano">
<img src="https://picsum.photos/id/158/400/400" alt="a live concert">
<img src="https://picsum.photos/id/234/400/400" alt="Paris">
</div>
.gallery {
--s: 280px; /* control the size */
display: grid;
width: var(--s);
aspect-ratio: 1;
padding: calc(var(--s)/20);
border-radius: 50%;
position: relative;
}
.gallery > img {
grid-area: 1/1;
width: 100%;
height: 100%;
object-fit: cover;
border-radius: inherit;
transform-origin: 50% 120.7%;
}
.gallery > img {
animation: m 8s infinite linear;
}
@keyframes m {
100% {transform: rotate(-360deg)}
}
body {
margin: 0;
min-height: 100vh;
display: grid;
justify-content: center;
background: #C2CBCE;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.