083D 곡선 마퀴
무대에 perspective 를, 트랙에 preserve-3d 를 걸고 카드마다 단계적인 rotateY 값을 줘 원통형으로 휘어진 벽처럼 보이게 한다.
쓰임프리미엄 느낌의 제품 쇼케이스, 포트폴리오 스트립
perspectivepreserve-3d단계별 rotateY

<main class="stage">
<div class="marquee">
<div class="marquee__track">
<span class="marquee__card"></span>
<span class="marquee__card"></span>
<span class="marquee__card"></span>
<span class="marquee__card"></span>
<span class="marquee__card"></span>
<span class="marquee__card" aria-hidden="true"></span>
<span class="marquee__card" aria-hidden="true"></span>
<span class="marquee__card" aria-hidden="true"></span>
<span class="marquee__card" aria-hidden="true"></span>
<span class="marquee__card" aria-hidden="true"></span>
</div>
</div>
</main>@use "../../../../site/static/demo-tokens" as *;
$duration: $dur-loop;
$easing: linear;
$color: $subject-blue;
@include stage($stage-paper);
.stage { perspective: 420px; }
.marquee {
width: min(300px, 80vw);
overflow: hidden;
}
.marquee__track {
display: flex;
width: max-content;
transform-style: preserve-3d;
animation: marquee-scroll $duration $easing infinite;
}
.marquee__card {
margin-right: 8px; // 트랙의 gap 대신 — 세트 폭이 정확히 절반이 되어 -50% 이음새가 0px 이 된다
flex-shrink: 0;
width: 40px;
height: 64px;
border-radius: $r-control;
background: $color;
box-shadow: $shadow-press;
transform-style: preserve-3d;
}
// 카드 5장을 부채꼴로 기울여 원통 벽처럼 보이게 한다 — 같은 각도 표를 복제본(6~10번째)에도 그대로 반복해
// 이음매에서 곡률이 끊기지 않는다
@for $i from 1 through 10 {
$step: ($i - 1) % 5;
.marquee__card:nth-child(#{$i}) {
transform: rotateY(#{($step - 2) * 22}deg) translateZ(#{-1 * (2 - if($step > 2, 4 - $step, $step)) * 20}px);
}
}
@keyframes marquee-scroll {
from { transform: translateX(0); }
to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
.marquee__track { animation: none; transform: translateX(0); }
}html, body {
margin: 0;
overflow: hidden;
}
.stage {
box-sizing: border-box;
min-height: 100vh;
display: grid;
place-items: center;
margin: 0;
background: #ffffff;
font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
padding: clamp(8px, 4vw, 24px);
}
.stage {
perspective: 420px;
}
.marquee {
width: min(300px, 80vw);
overflow: hidden;
}
.marquee__track {
display: flex;
width: max-content;
transform-style: preserve-3d;
animation: marquee-scroll 2s linear infinite;
}
.marquee__card {
margin-right: 8px;
flex-shrink: 0;
width: 40px;
height: 64px;
border-radius: 12px;
background: #2f6df6;
box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
transform-style: preserve-3d;
}
.marquee__card:nth-child(1) {
transform: rotateY(-44deg) translateZ(-40px);
}
.marquee__card:nth-child(2) {
transform: rotateY(-22deg) translateZ(-20px);
}
.marquee__card:nth-child(3) {
transform: rotateY(0deg) translateZ(-0px);
}
.marquee__card:nth-child(4) {
transform: rotateY(22deg) translateZ(-20px);
}
.marquee__card:nth-child(5) {
transform: rotateY(44deg) translateZ(-40px);
}
.marquee__card:nth-child(6) {
transform: rotateY(-44deg) translateZ(-40px);
}
.marquee__card:nth-child(7) {
transform: rotateY(-22deg) translateZ(-20px);
}
.marquee__card:nth-child(8) {
transform: rotateY(0deg) translateZ(-0px);
}
.marquee__card:nth-child(9) {
transform: rotateY(22deg) translateZ(-20px);
}
.marquee__card:nth-child(10) {
transform: rotateY(44deg) translateZ(-40px);
}
@keyframes marquee-scroll {
from {
transform: translateX(0);
}
to {
transform: translateX(-50%);
}
}
@media (prefers-reduced-motion: reduce) {
.marquee__track {
animation: none;
transform: translateX(0);
}
}import type { CSSProperties } from "react";
import styles from "./Curved3DMarquee.module.scss";
export type Curved3DMarqueeProps = {
count?: number;
duration?: number;
easing?: string;
color?: string;
};
type Vars = CSSProperties & { "--duration"?: string; "--easing"?: string; "--color"?: string };
export default function Curved3DMarquee({
count = 5,
duration = 12000,
easing = "linear",
color = "#2f6df6",
}: Curved3DMarqueeProps) {
const vars: Vars = { "--duration": `${duration}ms`, "--easing": easing, "--color": color };
const cards = Array.from({ length: count * 2 });
return (
<div className={styles.stage3d}>
<div className={styles.marquee} style={vars}>
<div className={styles.track}>
{cards.map((_, i) => (
<span key={i} className={styles.card} aria-hidden={i >= count} />
))}
</div>
</div>
</div>
);
}08 3D 곡선 마퀴 — 측정 누적면적 13.333% · 움직인 프레임 23/23GODRICH 원작 · zip 에 SCSS·React 포함 · CSS 무한 롤링 배너 9종 — AOS·GSAP 없이, JS 0줄
이 데모가 속한 글
CSS 무한 롤링 배너 9종 — AOS·GSAP 없이, JS 0줄css 무한 롤링 배너는 로고나 문구를 담은 콘텐츠 줄이 끊김 없이 한 방향으로 계속 흘러가는 애니메이션입니다. AOS·GSAP 없이, JS 0줄로 아홉 가지를 전부 만들었고, 그중 하나(09)는 화면이 아니라 사용 이 글의 데모 전부 보기


