Quarto RevealJS演示文稿在浏览器中无法向下滚动求助
解决Quarto RevealJS幻灯片无法滚动的问题
- 升级Quarto到最新稳定版:旧版本可能存在
scrollable参数的兼容bug,执行命令quarto upgrade更新后再测试。 - 调整YAML中的高度与边距配置:在
revealjs格式下添加height: auto和margin参数,让幻灯片高度自适应内容,避免内容被截断:
title: "Regression" author: "Me" format: revealjs: theme: dark incremental: true scrollable: true height: auto margin: 0.2 transition: slide execute: echo: true editor: visual
- 修正单张幻灯片的滚动语法:确保
{.scrollable}与标题在同一行,语法正确:
# Preparation {.scrollable} - `jtools` is just a quick way to produce regression analyses and plots - dataset is from base R - We have a significant interaction . . .
- 强制自定义CSS允许滚动:如果是代码输出(如
summ()的结果)导致的样式冲突,新建custom.css文件并添加以下内容:
.scrollable .reveal .slides section { overflow-y: auto !important; max-height: 90vh !important; }
然后在YAML的revealjs配置中添加css: custom.css。
- 排查自定义代码干扰:暂时移除所有额外的CSS、JS配置,测试基础版幻灯片是否能正常滚动,排除第三方代码的影响。
内容的提问来源于stack exchange,提问作者Adil
相关产品推荐
相关产品推荐

