# Marker Highlight (记号笔划重点)

After the headline settles and rests 0.4 s, one semi-transparent marker stroke runs across a single key word, slow at both ends and fast in the middle; for stressing the one word that matters.

- Ref: `video/motion-text-marker-highlight` (code video · motion · any · any · 4s at 30fps)
- Page: https://uifino.com/en/videos/motion-text-marker-highlight
- Markdown: https://uifino.com/md/videos/motion-text-marker-highlight.md
- Preview image: https://uifino.com/videos/motion-text-marker-highlight/poster.jpg

## Install

- ZIP: https://uifino.com/videos/motion-text-marker-highlight/source.zip

After the headline settles and rests 0.4 s, one semi-transparent marker stroke runs across a single key word, slow at both ends and fast in the middle; for stressing the one word that matters.

Rendered video: https://uifino.com/videos/motion-text-marker-highlight/preview.mp4

## Beats

- 0-0.7s Headline enters: The whole line sharpens from 8 px blur and zero opacity, power4.out, settled at 0.7 s Camera: static. On-screen text: "Get the details right before you ship".
- 0.7-1.1s Let the viewer read: Fully still for 0.4 s Camera: static.
- 1.1-1.7s Mark the key word: One semi-transparent stroke over the key word, stroke-draw power2.inOut, slow-fast-slow Camera: static.
- 1.7-4s Still tail: Fully still, no flash, no exit Camera: static.

## Parameters

- `headline` Headline: default 上线前，先把细节做对
- `accentWord` Word to mark: default 细节
- `markerColor` Marker color: default #D4412A
- `markerOpacity` Marker opacity: default 0.46, range 0.2 to 0.6
- `markerThickness` Stroke width (240x64 box): default 56, range 32 to 64
- `bg` Background: default #F6F5F2
- `ink` Text color: default #121212
- `fontSize` Font size: default 120px, range 64 to 160px
- `enterAt` Headline start: default 0.1s, range 0 to 0.5s
- `enterDuration` Headline entrance: default 0.6s, range 0.3 to 1s
- `enterBlur` Start blur: default 8px, range 0 to 16px
- `gap` Wait before stroke: default 0.4s, range 0.3 to 1s
- `strokeDuration` Stroke duration: default 0.6s, range 0.4 to 1s
- `strokeEase` Stroke ease: default power2.inOut

## Good for

- One word in a one-line claim needs stressing
- A relaxed, hand-annotated emphasis
- Works for Chinese and English; the word is a continuous part of the line

## Not for

- Stressing a whole sentence or several words
- A formal, cold brand tone
- A word that wraps across two lines

## Source files (plain text)

- https://uifino.com/videos/motion-text-marker-highlight/source/SPEC.md
- https://uifino.com/videos/motion-text-marker-highlight/source/PROMPT.md
- https://uifino.com/videos/motion-text-marker-highlight/source/NOTICE.md
- https://uifino.com/videos/motion-text-marker-highlight/source/project/assets/fonts/OFL.txt
- https://uifino.com/videos/motion-text-marker-highlight/source/project/compositions/marker.html
- https://uifino.com/videos/motion-text-marker-highlight/source/project/hyperframes.json
- https://uifino.com/videos/motion-text-marker-highlight/source/project/index.html

## How to use

- Copy the beats and parameters; replace only the copy, the accent color and the product screenshots.
- `PROMPT.md` has two prompts: one to reproduce this video exactly, one to learn only the technique.
- Build with HyperFrames (`/hyperframes`); the project in the ZIP is a ready starting point.

## Files

| Path | Role | Size |
| :--- | :--- | ---: |
| PROMPT.md | doc | 2.7 KB |
| SPEC.md | doc | 4.7 KB |

### PROMPT.md

```md
# PROMPT：motion-text-marker-highlight

## 照抄复刻
用 `/hyperframes` 做一个 1920×1080、30 fps、4 秒的标题动效，只有一行字，底色 `#F6F5F2`，字色 `#121212`，字号 120、字重 700、字距 -0.02em、行高 1.3，单行居中不换行，文字视觉中心在画面 45% 高度。中文用 Noto Sans SC，西文用 Hanken Grotesk（都是 `@font-face` 指向 `assets/fonts/`，不要联网取字体）。文案「上线前，先把细节做对」，只划「细节」两个字。

做法：
1. 把整句拆成三段：前文、要划的词、后文。要划的词放进一个 `position: relative; display: inline-block` 的容器，容器里先放一个 SVG（在下层），再放文字（`position: relative; z-index: 1`，在上层）。
2. SVG：`viewBox="0 0 240 64"`、`preserveAspectRatio="none"`，绝对定位，`left: -0.06em`，宽 `calc(100% + 0.12em)`，`top: 0.34em`，高 `0.64em`，整体旋转 -1.2°。里面只有一条路径 `M 36 41 C 64 31, 90 40, 124 33 C 152 28, 182 36, 200 27`，`fill: none`，描边 `#D4412A`、透明度 0.46、线宽 56、圆头圆角。路径设 `pathLength="1"`、`stroke-dasharray="1 2"`、`stroke-dashoffset="1"`，初始 `stroke-opacity="0"`（圆头会在终点留一个点，必须靠透明度藏住），到起笔时刻用 `tl.set` 把透明度设成 0.46，起笔前什么都看不见。
3. 标题入场 0.10–0.70 秒：整行一起从 `blur(8px)` 加透明度 0 变清楚，`power4.out`，不位移、不缩放、不逐字。
4. 落定后完全静止 0.4 秒（0.70–1.10 秒）。
5. 划线 1.10–1.70 秒：只动画 `stroke-dashoffset` 从 1 到 0，`power2.inOut`，一笔完成，不重复描边，不闪。
6. 1.70–4.00 秒完全静止，没有退场。

需要替换的地方：
- 文案（变量 `headline`）：中文 `上线前，先把细节做对`，英文 `Get the details right before you ship`（英文把 `fontSize` 调到 96）。
- 要划的词（`accentWord`，必须是文案里的连续片段，只划第一次出现的位置）：中文 `细节`，英文 `details`。
- 颜色：记号笔 `markerColor`、底色 `bg`、字色 `ink`；记号笔透明度 `markerOpacity`、线宽 `markerThickness`、字号 `fontSize`。
- 时间：标题开始 `enterAt`、入场时长 `enterDuration`、起始模糊 `enterBlur`、落定后等待 `gap`、划线时长 `strokeDuration`、划线缓动 `strokeEase`。

## 只学手法
先让整句落定并停 0.4 秒让人读完，再用一条半透明（0.46）的描边路径在字的下层划过一个词：`stroke-dashoffset` 1 → 0，0.6 秒，`power2.inOut` 让起笔和收笔慢、中间快，路径带一点弧度和起伏、整体微转 -1.2°，一笔到底，划完画面完全静止。
```

### SPEC.md

```md
# SPEC：motion-text-marker-highlight

## LOOK
- 色值：底 `#F6F5F2`，字 `#121212`，强调色 `#D4412A`（只用在记号笔上，透明度 0.46，面积不到画面的 1%）。另外两个中性色 `#6B6966`、`#E2DFD8` 本条没有用到，中性色实际只有 2 个。
- 字体：中文 Noto Sans SC，西文 Hanken Grotesk，都是本地 `@font-face`，文件在 `assets/fonts/`，由门禁按用到的字生成子集（OFL）。
- 字号：只有一档 120px，字重 700，字距 -0.02em，行高 1.3，单行不换行居中，文字视觉中心在画面 45% 高度（y = 486px）。
- 圆角：无。阴影：无。没有任何装饰元素，画面上只有那一句话和一道笔触。
- 记号笔：颜色 `#D4412A`，透明度 0.46，压在字的下层（字在上、笔在下）。笔触在一个 240 × 64 的坐标框里，线宽 56，圆头。覆盖字的下半部，从 0.34em 高度开始，高 0.64em，左右各多出 0.06em；路径 `M 36 41 C 64 31, 90 40, 124 33 C 152 28, 182 36, 200 27`，起点和终点连圆头在内都落在 240 坐标框内，右端收在「节」字内，不压到「做」。整条笔触顺时针微转 -1.2°，像手压出来的角度。

## MOTION
- 标题入场：整行一起从 `blur(8px)` + 透明度 0 变清楚，`power4.out`，0.10 秒开始、0.60 秒结束，0.70 秒落定。不位移、不缩放、不逐字。
- 落定后等待：0.4 秒（0.70 → 1.10），画面上没有任何东西在动，让观众把整句读完。
- 划线：1.10 秒起，用 SVG 路径描边动画（`pathLength` 归一成 1，`stroke-dasharray="1 2"`，`stroke-dashoffset` 从 1 到 0；起笔前 `stroke-opacity` 为 0，到 1.10 秒用 `tl.set` 恢复成 `markerOpacity`，所以起笔前画面上没有任何记号笔的圆头），0.60 秒，到 1.70 秒结束。缓动 `power2.inOut`：起笔慢、中间快、收笔慢。路径本身不是直线：起点偏低、中段抬高再压低、收尾轻微上挑，一笔画成，没有重复描边。
- 划完：1.70 秒到 4.00 秒完全静止，共 2.30 秒，不闪、不脉冲、不呼吸、不退场。最后一句话停留超过 2 秒。
- 缓动一共两种：`power4.out`（到达）、`power2.inOut`（划线）。

## 逐拍节拍表
| 拍 | 起止秒 | 画面 | 镜头 | 转场 | 屏幕文案原文 |
| --- | --- | --- | --- | --- | --- |
| enter | 0.00 - 0.70 | 整句从模糊变清楚，0.70 秒落定 | 固定 | 无 | 上线前，先把细节做对 |
| wait | 0.70 - 1.10 | 完全静止，让人读完 | 固定 | 无 | 同上 |
| mark | 1.10 - 1.70 | 一笔记号笔从左到右划过「细节」 | 固定 | 无 | 同上 |
| hold | 1.70 - 4.00 | 完全静止 | 固定 | 无 | 同上 |

英文版：「Get the details right before you ship」，强调词 `details`。代码按 `headline` 里的位置自动找强调词，笔触宽度跟着词宽走（SVG 横向自适应，竖向粗细不变），不用改别的。

## 参数接线
全部是 `project/compositions/marker.html` 根元素上的 `data-composition-variables`，在挂载处用 `data-variable-values` 覆盖：
- `headline`（整句）、`accentWord`（要划的词，必须是整句里的连续片段，只划第一次出现的位置）
- `bg`（写到 `#root` 背景）、`ink`（写到 `#mk-line` 字色）、`markerColor`（`#D4412A`）、`markerOpacity`（0.46）
- `fontSize`（120）、`markerThickness`（56，笔触线宽，坐标框 240 × 64 里的数）
- `enterAt`（0.10）、`enterDuration`（0.60）、`enterBlur`（8）
- `gap`（0.40，落定到起笔的等待）、`strokeDuration`（0.60）、`strokeEase`（`power2.inOut`）

总时长 4 秒写在 `project/index.html` 的 `data-duration`，和 `marker.html` 里宿主的 `data-duration` 两处要一起改。

## 禁用项
整句都划、多种颜色、划完后闪一下、渐变字、彩色辉光、标题落定后任何缩放或漂移、小标签和注释、点击光圈、弹跳。

## 已知取舍
- 门禁警告 `first_frame_empty`（第 0 帧几乎只有底色）：保留。标题是从模糊和透明里变清楚的，第 0 帧本来就是空的；封面取 2.2 秒，那时笔触已划完。
- 英文版「Get the details right before you ship」在 120px 下一行约 1860px 宽，几乎顶到画面两边，超出 80% 安全框。换英文时把 `fontSize` 调到 96（一行约 1500px），其余参数不变。已临时用英文文案截图确认笔触宽度跟着词走（截完已还原，成片是中文版）。
- 画面文字 11 个字（含逗号），笔触划完后停留 2.30 秒，高于「字数 × 0.25 秒」。入场加等待共 1.1 秒才开始划，是 BRIEF 要的节奏。
- 没有退场：BRIEF 没要求，最后 2.3 秒静止收尾，片子里使用时由上一层的转场带走。
```
