<div class="scene">
<div class="banner">
<div class="panel"></div>
<div class="panel"></div>
<div class="panel"></div>
<div class="panel"></div>
<div class="panel"></div>
<div class="panel"></div>
<div class="panel"></div>
<div class="panel"></div>
<div class="panel"></div>
<div class="panel"></div>
<div class="panel"></div>
<div class="panel"></div>
<div class="panel"></div>
<div class="panel"></div>
<div class="panel"></div>
<div class="panel"></div>
<div class="panel"></div>
<div class="panel"></div>
<div class="panel"></div>
<div class="panel"></div>
<div class="panel"></div>
<div class="panel"></div>
<div class="panel"></div>
<div class="panel"></div>
</div>
<div class="screen"></div>
</div>
body {
background-color: #000;;
color: #fff;
min-height: 100vh;
display: grid;
place-items: center;
perspective: 500px;
perspective-origin: 50% calc(50% - 150px);
}
.scene {
position: relative;
transform-style: preserve-3d;
}
.banner {
display: flex;
transform-style: preserve-3d;
animation: rotate 24s infinite linear;
}
@keyframes rotate {
to { transform: rotateY(-360deg); }
}
$width: 50px;
.panel {
position: absolute;
transform: translate(-50%, -50%) rotateY(var(--angle)) translateZ(190px);
width: $width;
height: 120px;
// border: 1px solid white;
// background-color: #fff4;
overflow: hidden;
}
.panel::before {
position: absolute;
left: var(--left);
content: "Hello World, it's a nice day!";
font-size: 96px;
width: max-content;
color: hsl(var(--hue), 75%, 75%);
}
@for $i from 0 to 24 {
.panel:nth-child(#{$i + 1}) {
--left: #{$width * $i * -1};
--hue: #{360 / 24 * $i};
--angle: #{360deg / 24 * $i};
}
}
.screen {
position: absolute;
width: 400px; height: 400px;
// background-color: #000a;
background-image: linear-gradient(90deg, #000a, #0004, #000a);
transform: translate(-50%, -50%);
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.