You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在Quarto Reveal.js幻灯片的增量列表中添加Callout Block?

在Quarto Reveal.js增量列表中实现Callout Block增量显示

可以实现,有两种可行的方法:

方法1:将Callout嵌套进列表项

把Callout作为增量列表的一个列表项内容,确保缩进正确,就能让它随列表一起增量显示:

---
title: "Callout Block in revealjs"
format: revealjs
---

## Slide

::: {.incremental}
- Here some text
- 
  ::: {.callout-tip}
  ## Tip with Title
  This is an example of a callout with a title.
  :::
:::

方法2:给Callout添加.fragment类

Quarto的.incremental容器本质是给子元素添加Reveal.js的.fragment类来实现增量效果,直接给Callout块添加这个类即可:

---
title: "Callout Block in revealjs"
format: revealjs
---

## Slide

::: {.incremental}
- Here some text

::: {.callout-tip .fragment}
## Tip with Title
This is an example of a callout with a title.
:::
:::

两种方法都能让Callout Block和列表文本一样逐步显示,你可以根据排版需求选择合适的方式。

内容的提问来源于stack exchange,提问作者Quinten

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.24 05:22:16