scroll - 如何在四开中水平滚动?

标签 scroll reveal.js quarto

我想知道是否可以在 Quartorevealjs 演示文稿中添加水平滚动条?以下代码可以在幻灯片中垂直滚动:

---
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 

输出:

enter image description here

所以我想知道是否有人知道是否可以在 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;
}

both horizontal and verticall scrolling

关于scroll - 如何在四开中水平滚动?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74280586/

相关文章:

hosting - 如何主持reveal.js演示

r - 四开演示文稿的默认字体是什么?

javascript - 使用 jQuery 或 JavaScript 添加平滑滚动

Javascript - 停止在某些链接上滚动

javascript - 单击 <a href ="#divID"> 后防止浏览器垂直滚动

pdf - 如何调整四开本(PDF 输出)中的图形大小?

html - 在 R 函数中设置 html 表的类

python - 用于在 Canvas 上滚动的 Tkinter 鼠标滚轮操作

ipad - 如何添加一个图片库以在reveal.js 的幻灯片上滑动?

r - 如何在 Rpres (R Presentation) 幻灯片中添加全屏背景图片?