03ホログラフィック箔カード
グリッドの各カードに斜めのホログラフィック箔の帯が一巡するたびに走り、ホログラムシールを傾けたときの虹色の反射を再現します。
使いどころ機能紹介グリッド・ポートフォリオカード
대각선 foil 스윕mix-blend-mode: overlayhover 승격

<main class="stage">
<article class="card-c">
<span class="card-c__icon" aria-hidden="true"></span>
<h3 class="card-c__title">リアルタイムプレビュー</h3>
<p class="card-c__desc">変更はすぐに画面へ反映されます。</p>
</article>
</main>@use "../../../../site/static/demo-tokens" as *;
$duration: $dur-loop;
$easing: linear;
$color: $subject-blue;
@include stage($stage-orange);
.stage { padding: clamp(8px, 3vw, 20px); }
.card-c {
position: relative;
overflow: hidden;
box-sizing: border-box;
width: min(240px, 78vw);
border-radius: $r-card;
background: $stage-ink;
box-shadow: $shadow-raised;
padding: $sp-5;
display: flex;
flex-direction: column;
gap: $sp-2;
}
// 홀로그램 포일 띠 — mix-blend-mode 로 카드 표면 위에 얹혀 대각선으로 한 바퀴씩 지나간다 (유일한 애니메이션)
.card-c::after {
content: "";
position: absolute;
inset: -30% -10%;
pointer-events: none;
mix-blend-mode: overlay;
opacity: .8;
background: repeating-linear-gradient(115deg,
transparent 0 18px,
rgba($color, .55) 18px 30px,
rgba($stage-yellow, .55) 30px 42px,
rgba($subject-cream, .6) 42px 54px,
transparent 54px 72px);
background-size: 200% 200%;
animation: foilSweep $duration $easing infinite;
}
.card-c__icon { position: relative; z-index: 1; width: $sp-8; height: $sp-8; border-radius: $r-sm; background: radial-gradient(circle at 30% 30%, $subject-cream, $color 55%, $stage-ink 100%); }
.card-c__title {
position: relative;
z-index: 1;
margin: 0;
color: $stage-paper;
font-weight: 700;
font-size: clamp(13px, 3.2vw, 15px);
line-height: 1.3;
font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
}
.card-c__desc {
position: relative;
z-index: 1;
margin: 0;
color: rgba($stage-paper, .7);
font-weight: 500;
font-size: clamp(11px, 2.6vw, 12.5px);
line-height: 1.4;
font-family: inherit;
}
@keyframes foilSweep { 0% { background-position: 0% 0%; } 100% { background-position: -140% -140%; } }
@media (prefers-reduced-motion: reduce) {
.card-c::after { animation: none; }
}html, body {
margin: 0;
overflow: hidden;
}
.stage {
box-sizing: border-box;
min-height: 100vh;
display: grid;
place-items: center;
margin: 0;
background: #ff4d1f;
font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
padding: clamp(8px, 4vw, 24px);
}
.stage {
padding: clamp(8px, 3vw, 20px);
}
.card-c {
position: relative;
overflow: hidden;
box-sizing: border-box;
width: min(240px, 78vw);
border-radius: 16px;
background: #17141a;
box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
padding: 20px;
display: flex;
flex-direction: column;
gap: 8px;
}
.card-c::after {
content: "";
position: absolute;
inset: -30% -10%;
pointer-events: none;
mix-blend-mode: overlay;
opacity: 0.8;
background: repeating-linear-gradient(115deg, transparent 0 18px, rgba(47, 109, 246, 0.55) 18px 30px, rgba(255, 210, 63, 0.55) 30px 42px, rgba(255, 247, 230, 0.6) 42px 54px, transparent 54px 72px);
background-size: 200% 200%;
animation: foilSweep 2s linear infinite;
}
.card-c__icon {
position: relative;
z-index: 1;
width: 32px;
height: 32px;
border-radius: 8px;
background: radial-gradient(circle at 30% 30%, #fff7e6, #2f6df6 55%, #17141a 100%);
}
.card-c__title {
position: relative;
z-index: 1;
margin: 0;
color: #ffffff;
font-weight: 700;
font-size: clamp(13px, 3.2vw, 15px);
line-height: 1.3;
font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
}
.card-c__desc {
position: relative;
z-index: 1;
margin: 0;
color: rgba(255, 255, 255, 0.7);
font-weight: 500;
font-size: clamp(11px, 2.6vw, 12.5px);
line-height: 1.4;
font-family: inherit;
}
@keyframes foilSweep {
0% {
background-position: 0% 0%;
}
100% {
background-position: -140% -140%;
}
}
@media (prefers-reduced-motion: reduce) {
.card-c::after {
animation: none;
}
}import type { CSSProperties } from "react";
import styles from "./CardGridChrome.module.scss";
export type CardGridChromeProps = {
title?: string;
desc?: string;
/** 한 주기(기본 2000ms) */
duration?: number;
easing?: string;
color?: string;
};
type Vars = CSSProperties & { "--duration"?: string; "--easing"?: string; "--color"?: string };
export default function CardGridChrome({
title = "Live preview",
desc = "Every change reflects on screen instantly.",
duration = 2000,
easing = "linear",
color = "#2f6df6",
}: CardGridChromeProps) {
const vars: Vars = { "--duration": `${duration}ms`, "--easing": easing, "--color": color };
return (
<article className={styles.card} style={vars}>
<span className={styles.icon} aria-hidden="true" />
<h3 className={styles.title}>{title}</h3>
<p className={styles.desc}>{desc}</p>
</article>
);
}03 ホログラフィック箔カード — 計測 累積面積 10.607% · 動いたフレーム 23/23GODRICH オリジナル · SCSS と React は zip に同梱 · y2k webデザインとは?クロムとホログラフィックのLPパーツ9選
このデモが属する記事
y2k webデザインとは?クロムとホログラフィックのLPパーツ9選y2k webデザインとは、2000年代のCDやホログラム包装紙にあったクロムの輝きと虹色の反射を、CSSだけで蘇らせるスタイルです。CDの裏で虹色ににじんでいたあの光が、今度はボタンや見出しの中に入ってきました。 この記事のデモをすべて見る


