返回风格库
视觉风格expressive

电影视频首屏

Cinematic Video Hero

以短循环视频开场的电影级首屏。海报帧先出作 LCP,视频进视口才静音自动播、无缝循环;文字压在可读性遮罩上,暗场调色与缓慢运动营造预告片般的沉浸开场。

电影视频首屏视觉预览
主色#05060A
次色#F3EFE8
强调色 1#E4C063
强调色 2#141821
强调色 3#9AA6B8

AI 实现规则

你是一个电影视频首屏(Cinematic Video Hero)风格的前端开发专家。生成的所有代码必须严格遵守以下约束:

## 绝对禁止

- 视频作 LCP 依赖 / 省略 poster(首屏白屏、LCP 爆炸)
- preload="auto" 或自动加载大视频
- 把关键信息放进视频(视频可能不播 / 被降级)
- 有声自动播(浏览器拦截 + 打扰)
- 文字直接压视频不加遮罩
- 快速 / 跳变运动、不无缝的循环
- 忽略 prefers-reduced-motion 与移动端降级

## 必须遵守

### 海报优先(poster = LCP)
video 必带 poster 属性,指向小而清晰的 AVIF/WebP 首帧。poster 秒开、作 LCP;视频是渐进增强。
显式 aspect-ratio(如 h-screen 或 aspect-video)防 CLS。

### 视频加载与播放
- 属性: muted loop playsInline preload="none" + poster
- 进视口才播(IntersectionObserver),不要页面一载就 load:
const io = new IntersectionObserver(([e]) => {
  if (e.isIntersecting) { v.load(); v.play().catch(()=>{}); io.disconnect(); }
}, { threshold: 0.25 });
- 双 source: <source src="x.webm" type="video/webm"><source src="x.mp4" type="video/mp4">

### 可读性遮罩
文字压视频前铺渐变暗罩,保证 4.5:1:
linear-gradient(to top, rgba(5,6,10,0.78), rgba(5,6,10,0.2) 45%, rgba(5,6,10,0.45))

### 暗场电影调色
- 近黑底 #05060A / 抬升面 #141821 / 纸白文字 #F3EFE8
- 图上文字: text-white + white/80 + white/60
- 唯一暖金 #E4C063:主 CTA、章节 kicker、高亮;钢蓝 #9AA6B8 作次要
- 可选:cv-letterbox 上下黑边营造宽银幕

### 降级(关键)
- prefers-reduced-motion: 不 autoplay,显 poster 静帧,给播放按钮让用户主动触发
- Save-Data (navigator.connection.saveData): 完全不加载视频,只显 poster
- 移动端可只显 poster(省流 + 省电)

### 无障碍
- 纯装饰视频 aria-hidden="true";有信息内容配 <track kind="captions">
- 提供暂停/播放入口,别剥夺用户控制

## 自检

1. video 有 poster 且 poster 是 LCP、秒开?
2. preload="none" + 进视口才播(IO)?
3. muted loop playsInline,无声无缝短循环?
4. 文字压视频有遮罩、对比达标?
5. 关键信息在文字层不在视频里?
6. 有 prefers-reduced-motion / Save-Data 降级?
7. 暗场调色 + 唯一暖金强调 + 防 CLS?

组件预览与实现

inline-flex items-center gap-2 rounded-full transition-all duration-300 ease-out active:scale-[0.98] bg-[#E4C063] text-[#05060A] font-semibold hover:bg-[#efce78]
button

Button

Warm-gold cinematic CTA and a frosted secondary

<button className="inline-flex items-center gap-2
  px-7 py-3.5 rounded-full
  bg-[#E4C063] text-[#05060A] font-semibold
  hover:bg-[#efce78] active:scale-[0.98]
  transition-all duration-300
">
  Watch the film
  <span aria-hidden>&#9654;</span>
</button>

<button className="inline-flex items-center gap-2 px-7 py-3.5 rounded-full
  bg-white/10 backdrop-blur-md border border-white/25 text-white
  hover:bg-white/18 transition-all duration-300">
  Learn more
</button>
card

Card

Poster-backed scene card with scrim caption

<article className="relative aspect-video overflow-hidden rounded-xl">
  <img src="/poster.avif" alt="Aurora over the range" loading="lazy" decoding="async"
    className="absolute inset-0 w-full h-full object-cover" />
  <div className="absolute inset-0 bg-gradient-to-t from-black/75 to-transparent" />
  <div className="absolute bottom-0 p-5">
    <p className="text-xs uppercase tracking-widest text-[#E4C063] mb-1">Scene 01</p>
    <h3 className="text-white text-lg font-semibold">The long dissolve</h3>
  </div>
</article>
input

Input

Frosted field legible over footage

<input type="email" placeholder="Email for the premiere"
  className="w-full px-5 py-3 rounded-full
    bg-white/10 backdrop-blur-md border border-white/25
    text-white placeholder-white/50
    focus:outline-none focus:border-[#E4C063]/70 focus:bg-white/15
    transition-all duration-300" />
nav

Navigation

Transparent-to-scrim nav floating over the video

<nav className="fixed top-0 inset-x-0 z-50 bg-gradient-to-b from-black/60 to-transparent">
  <div className="max-w-6xl mx-auto px-6 h-16 flex items-center justify-between">
    <span className="text-white font-semibold tracking-tight">Aurora Studios</span>
    <div className="flex items-center gap-6 text-sm text-white/80">
      <a href="#films" className="hover:text-white transition-colors">Films</a>
      <a href="#about" className="hover:text-white transition-colors">About</a>
    </div>
  </div>
</nav>
hero

Hero

Poster-first video hero: LCP poster, in-view autoplay, scrim, reduced-motion fallback

function VideoHero() {
  const ref = useRef(null);
  useEffect(() => {
    const v = ref.current;
    if (!v) return;
    if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) return; // keep poster still
    const io = new IntersectionObserver(([e]) => {
      if (e.isIntersecting) { v.load(); v.play().catch(() => {}); io.disconnect(); }
    }, { threshold: 0.25 });
    io.observe(v);
    return () => io.disconnect();
  }, []);
  return (
    <section className="relative h-screen overflow-hidden bg-[#05060A]">
      <video ref={ref} poster="/poster.avif" muted loop playsInline preload="none" aria-hidden="true"
        className="absolute inset-0 w-full h-full object-cover">
        <source src="/aurora.webm" type="video/webm" />
        <source src="/aurora.mp4" type="video/mp4" />
      </video>
      <div className="absolute inset-0 bg-gradient-to-t from-black/75 via-black/20 to-black/40" />
      <div className="relative z-10 h-full flex flex-col justify-end max-w-6xl mx-auto px-6 pb-24">
        <p className="text-[#E4C063] uppercase tracking-widest text-sm mb-3">Now screening</p>
        <h1 className="text-white text-5xl md:text-7xl font-semibold max-w-3xl leading-[1.05]">
          Some stories only move
        </h1>
      </div>
    </section>
  );
}

交互展示

适用范围与设计理念

应用场景

marketingcreativeportfolio

视觉关键词

cinematicvideo herobackground videolooppostertrailer电影感视频背景首屏循环

电影视频首屏的信条:开场是一部预告片,不是一张幻灯片。视频给静态页面注入时间感——光在流动、雾在飘、色在呼吸——但它必须先让位于性能:海报帧秒开,视频悄悄补上。

核心理念:

- 海报优先:poster 帧是 LCP,必须瞬间可见(AVIF/WebP,小而精)。视频是渐进增强,不是首屏依赖

- 视频是氛围不是内容:背景视频承载情绪与运动感,关键信息永远在文字层,不在视频里(视频可能不播)

- 静音自动循环:muted + autoplay + loop + playsInline,无声才能自动播;短循环(6-10s)无缝衔接,绝不突兀跳帧

- 可读性遮罩:文字压视频必铺渐变暗罩,保证 4.5:1;视频再动也不能吃掉文字

- 暗场电影调色:近黑底 + 低饱和冷暖对撞 + 一支暖金强调(#E4C063),像调色过的胶片

- 缓慢运动:镜头感的慢,不是花哨的快。运动服务氛围,快了就晕

设计原则:

- 性能红线:video preload="none"、进视口才 load/play(IntersectionObserver)、poster 属性兜底;显式宽高比防 CLS;hero 之外不放自动播视频

- 流量与降级:honor prefers-reduced-motion(不自动播、显 poster 静帧)、honor Save-Data(不加载视频)、移动端可只显 poster

- 格式:优先 webm(VP9/AV1) + mp4(H.264) 双 source;始终配 poster

- 无障碍:视频纯装饰要 aria-hidden;有信息的配 <track> 字幕;给用户暂停入口

应该这样做

  • 海报帧作 LCP:poster 属性 + AVIF/WebP,小而清晰,秒开
  • 视频 muted + autoplay + loop + playsInline,无声无缝短循环(6-10s)
  • video preload="none",用 IntersectionObserver 进视口才 load()/play()
  • 文字压视频必铺渐变可读性遮罩,保证 4.5:1 对比
  • 暗场电影调色:近黑 #05060A 底 + 一支暖金 #E4C063 强调
  • 显式 aspect-ratio 或固定容器高度防 CLS
  • 双格式 source:webm(VP9) + mp4(H.264),始终配 poster
  • 缓慢镜头感运动,关键信息全在文字层不在视频里
  • prefers-reduced-motion / Save-Data 下不自动播、显 poster 静帧

避免这样做

  • 禁止视频作 LCP 依赖 / 省略 poster(首屏白屏、LCP 爆炸)
  • 禁止 preload="auto" 或自动加载大视频(流量与性能灾难)
  • 禁止把关键信息放进视频(视频可能不播 / 被降级)
  • 禁止有声自动播(浏览器会拦,且打扰用户)
  • 禁止文字直接压视频不加遮罩
  • 禁止快速/跳变运动或不无缝的循环
  • 禁止忽略 prefers-reduced-motion 与移动端降级

全局 CSS

/* Cinematic Video Hero Global Styles */

:root {
  --cv-base: #05060A;
  --cv-surface: #141821;
  --cv-paper: #F3EFE8;
  --cv-gold: #E4C063;
  --cv-steel: #9AA6B8;
}

/* Full-bleed video / poster base */
.cv-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Readability scrims */
.cv-scrim-cinematic { background: linear-gradient(to top, rgba(5,6,10,0.78), rgba(5,6,10,0.2) 45%, rgba(5,6,10,0.45)); }

/* Letterbox bars for a filmic frame (optional) */
.cv-letterbox::before,
.cv-letterbox::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 6vh;
  background: #05060A;
  z-index: 20;
  pointer-events: none;
}
.cv-letterbox::before { top: 0; }
.cv-letterbox::after { bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  /* video is not autoplayed by script; poster stays. Nothing to animate. */
}

布局、色板与 Tokens

主色#05060A
次色#F3EFE8
强调色 1#E4C063
强调色 2#141821
强调色 3#9AA6B8
{
  "border": {
    "width": "border",
    "color": "border-white/20",
    "radius": "rounded-xl",
    "style": "border-solid"
  },
  "shadow": {
    "sm": "shadow-[0_2px_8px_rgba(0,0,0,0.4)]",
    "md": "shadow-[0_10px_30px_rgba(0,0,0,0.5)]",
    "lg": "shadow-[0_28px_70px_rgba(0,0,0,0.6)]",
    "none": "shadow-none",
    "hover": "hover:shadow-[0_16px_44px_rgba(0,0,0,0.55)]",
    "focus": "focus-visible:ring-2 focus-visible:ring-[#E4C063]/60",
    "colored": {}
  },
  "interaction": {
    "transition": "transition-all duration-300 ease-out",
    "active": "active:scale-[0.98]",
    "hoverOpacity": "hover:bg-white/18"
  },
  "typography": {
    "heading": "font-semibold text-white tracking-tight",
    "body": "text-white/80 leading-relaxed",
    "mono": "font-mono text-[#E4C063] uppercase tracking-widest",
    "sizes": {
      "hero": "text-5xl md:text-7xl",
      "h1": "text-4xl md:text-6xl",
      "h2": "text-3xl md:text-4xl",
      "h3": "text-xl md:text-2xl",
      "body": "text-base md:text-lg",
      "small": "text-sm"
    }
  },
  "spacing": {
    "section": "py-24 md:py-32",
    "container": "px-6 md:px-8",
    "card": "p-5",
    "gap": {
      "sm": "gap-4",
      "md": "gap-8",
      "lg": "gap-12"
    }
  },
  "colors": {
    "background": {
      "primary": "bg-[#05060A]",
      "secondary": "bg-[#141821]",
      "accent": [
        "bg-[#E4C063]"
      ]
    },
    "text": {
      "primary": "text-white",
      "secondary": "text-white/80",
      "muted": "text-white/60"
    },
    "button": {
      "primary": "bg-[#E4C063] text-[#05060A]",
      "secondary": "bg-white/10 backdrop-blur-md text-white border border-white/25"
    }
  },
  "forbidden": {
    "classes": [
      "bg-gradient-to-r",
      "from-indigo-600",
      "via-purple-600",
      "to-pink-500",
      "rounded-none",
      "duration-100"
    ],
    "patterns": [
      "^bg-gradient-to-r$",
      "^from-(indigo|purple|pink|fuchsia)-",
      "^rounded-none$"
    ],
    "reasons": {
      "bg-gradient-to-r": "Motion and color come from the footage, not decorative gradients",
      "from-indigo-600": "No AI-cliche gradients; the grade is near-black with one warm-gold accent",
      "rounded-none": "Cinematic framing reads softer with rounded-xl / rounded-full",
      "duration-100": "Cinematic motion is slow; snappy transitions break the mood"
    }
  },
  "required": {
    "button": [
      "rounded-full",
      "transition-all duration-300",
      "active:scale-[0.98]"
    ],
    "card": [
      "relative overflow-hidden",
      "rounded-xl"
    ],
    "input": [
      "bg-white/10 backdrop-blur-md",
      "border border-white/25",
      "rounded-full",
      "text-white placeholder-white/50",
      "focus:outline-none focus:border-[#E4C063]/70 focus:bg-white/15",
      "transition-all duration-300"
    ]
  }
}

示例提示词

电影工作室首屏

视频背景开场的工作室落地页

Create a cinematic video-hero studio landing page with:
1. Full-screen hero: a <video muted loop playsInline preload="none"> with a poster AVIF as the LCP; load()/play() only when in view via IntersectionObserver
2. webm + mp4 dual sources; a gradient readability scrim so the headline stays legible over the footage
3. Near-black #05060A grade, one warm-gold #E4C063 accent for the kicker and primary CTA
4. Optional letterbox bars for a widescreen frame; slow, seamless loop feel
5. A scene gallery of poster-backed aspect-video cards with scrim captions
6. prefers-reduced-motion: no autoplay, show the poster still with a play button; Save-Data: skip video
7. Frosted secondary buttons and inputs that stay legible over the video; critical info only in the text layer

产品发布预告首屏

视频预告式的产品发布首屏

Create a cinematic product launch teaser hero with:
1. A muted looping background video (poster-first, preload none, in-view autoplay) behind a centered product name
2. Poster AVIF as LCP; explicit h-screen to avoid CLS; webm + mp4 sources
3. Dark grade with a single gold #E4C063 CTA "Reserve yours"; scrim under the headline
4. A countdown or "premiere" kicker in gold, all real text (never baked into the video)
5. Below the fold, quiet #05060A sections with product detail — no autoplay video there
6. reduced-motion + Save-Data fallbacks to the poster still; mobile shows poster only
7. A visible mute/pause control; decorative video aria-hidden