For AI agents: the complete documentation index is available at https://lazygophers.github.io/pamphlet/llms.txt, the full documentation bundle is available at https://lazygophers.github.io/pamphlet/llms-full.txt, and this page is available as Markdown at https://lazygophers.github.io/pamphlet/write/components/reveal.md.
  • 简体中文
  • 滚动入场

    这是什么

    滚动到这一块时它才淡入或滑入。只做视觉节奏,不承载任何信息。

    怎么写

    :::reveal{effect=slide-left}
    滚动到这里时滑入。
    :::
    指令标题属性
    —effect

    四种效果

    值效果
    fade-up缺省,淡入并上移 12px
    fade-in只淡入
    slide-left从左侧滑入 16px
    slide-right从右侧滑入 16px

    写别的值报 DIR-206,诊断会把可用值全部列出来。

    出来是什么样

    关掉 JavaScript 时内容直接可见,没有动效。判据很简单:动效不承载信息,去掉它不损失任何东西。

    系统里打开「减少动态效果」(macOS 的辅助功能、Windows 的动画设置)之后动效也自动关闭——靠的是 CSS 的 prefers-reduced-motion,读者不需要做任何事。

    坑

    别用它藏重要内容

    这个指令的全部作用是视觉节奏。任何在「没有动效」时会丢失的东西,都不该放在这里。

    • 整篇每块都加 = 每块都没有节奏。一份文档里用两三处就够