我想知道是否可以在 Quarto
的 revealjs
演示文稿中添加水平滚动条?以下代码可以在幻灯片中垂直滚动:
---
title: "How to horizontally scrollable"
format: revealjs
---
## Slide Title {.scrollable}
- Some text
- Some more text
- Some text
- Some more text
- Some text
- Some more text
- Some text
- Some more text
- Some text
- Some more text
输出:
所以我想知道是否有人知道是否可以在 Quarto
中添加水平滚动条?
最佳答案
您所需要的只是一些 CSS 代码。
---
title: "How to horizontally scrollable"
format: revealjs
css: hscroll.css
---
## Slide Title {.hscroll .scrollable}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas dolor mauris, mattis non nunc nec, luctus aliquet magna. In tortor ante, aliquam eget felis eu, consectetur congue enim. Pellentesque pellentesque tincidunt lectus quis lacinia. Aliquam dolor sem, aliquet vitae aliquam eget, vehicula ac augue. Pellentesque molestie quam et commodo dignissim. Suspendisse potenti. Sed pellentesque metus non turpis condimentum molestie. Nullam accumsan urna nec luctus rutrum. Nunc dapibus auctor convallis. Praesent ac felis fermentum, venenatis elit vel, venenatis mi. Fusce non tellus risus. Phasellus elementum erat sit amet urna venenatis maximus. Nunc vehicula pretium scelerisque.
- Some text
- Some more text
- Some text
- Some more text
- Some text
- Some more text
- Some text
- Some more text
- Some text
- Some more text
hscroll.css
.hscroll {
overflow: auto;
white-space: nowrap;
}
关于scroll - 如何在四开中水平滚动?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74280586/