首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在Quarto中实现水平滚动?

如何在Quarto中实现水平滚动?
EN

Stack Overflow用户
提问于 2022-11-01 18:56:39
回答 1查看 43关注 0票数 0

我想知道是否可以在revealjs演示文稿中添加一个水平滚动的Quarto演示文稿?以下代码使在幻灯片中垂直滚动成为可能:

代码语言:javascript
复制
---
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中添加一个水平滚动

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-11-02 02:24:30

你所需要的只是一些css代码。

代码语言:javascript
复制
---
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

代码语言:javascript
复制
.hscroll {
  overflow: auto;
  white-space: nowrap;
}

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74280586

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档