You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在RStudio中为Quarto RevealJS演示文稿标题页添加指定布局图片?

在Quarto RevealJS标题页左右放置资助方图片的实现方法

完全可以实现,核心是通过自定义标题页内容来添加分栏布局的图片,以下是两种简单可行的方案:

方案一:用Quarto原生分栏布局

直接使用Quarto的:::title-slide块替换默认标题页,搭配:::columns实现左右分栏:

---
title: "Boring title"
format: revealjs
---

:::title-slide
# Boring title

:::columns
:::column
![左侧资助方](left-funding.png){width=200}
:::
:::column
![右侧资助方](right-funding.png){width=200}
:::
:::
  • 调整width=200可以修改图片尺寸,适配你的标题页
  • 如果需要让图片靠标题页底部对齐,给列块添加样式即可:
:::column{style="display: flex; align-items: flex-end; justify-content: center;"}
![左侧资助方](left-funding.png){width=200}
:::

方案二:用HTML flex布局自定义

如果需要更精准的位置控制,用纯HTML实现:

---
title: "Boring title"
format: revealjs
---

:::title-slide
<h1>Boring title</h1>
<div style="display: flex; justify-content: space-between; margin-top: 6em; padding: 0 2em;">
  <img src="left-funding.png" width="200" alt="左侧资助方">
  <img src="right-funding.png" width="200" alt="右侧资助方">
</div>
:::
  • 通过margin-top控制图片和标题的间距
  • padding: 0 2em可以调整图片和页面左右边缘的距离
  • justify-content: space-between会让两张图片分别靠左右两侧排列

以上两种方案都只会修改标题页,不会影响演示文稿的其他页面。

内容的提问来源于stack exchange,提问作者bird

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.24 08:07:28