如何在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
相关产品推荐
相关产品推荐

