使用图像的幻灯片背景在 Quarto Reveal JS 演示文稿中不起作用

pla*_*ter 4 pandoc rstudio reveal.js quarto

问题陈述

\n

使用 Rstudio 创建 RevealJS 演示文稿,无论我做什么,我都无法将背景更改为图像。

\n

什么有效,什么无效

\n
## title {background-image = "URL or file.extension" }\n
Run Code Online (Sandbox Code Playgroud)\n

或者

\n
{data-background-image= }\n
Run Code Online (Sandbox Code Playgroud)\n

不起作用,同时

\n
{background-color= }\n
Run Code Online (Sandbox Code Playgroud)\n

做。

\n

我一直在尝试几种媒体类型 - png、jpeg、gif。URL 和本地文件都位于项目的主文件夹中。所有这些图像在我的浏览器中加载得很好。

\n

我得到的是一张标题幻灯片,其中标题仅包含括号内的表达式:

\n

Rstudio 截图

\n

我还想使用 GIF 作为标题幻灯片的背景图像。这就是我最初打算做的事情,渐渐地我明白,即使是简单的幻灯片背景图像也无法像 Quarto 网站示例中所示的那样工作。

\n

会议信息

\n
> sessionInfo() \nR version 4.1.1 (2021-08-10) \nPlatform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19044)\n\n> RStudio.Version() \n\n$mode "desktop" \n\n$version \xe2\x80\x982022.7.1.554\xe2\x80\x99\n\n$long_version "2022.07.1+554"\n\n$release_name "Spotted Wakerobin"\n
Run Code Online (Sandbox Code Playgroud)\n

sha*_*fee 8

=指定背景属性时,请勿在等号(即 )两侧使用空格。

background-image对于或background-color任何其他幻灯片背景属性都是如此

微量元素

---
title: "Backgrounds"
format: revealjs
---

## Quarto {background-image="https://placeholder.pics/svg/500"} 

Quarto enables you to weave together content and executable code into a finished presentation. To learn more about Quarto presentations see <https://quarto.org/docs/presentations/>.

## Bullets {background-color="red"}

When you click the **Render** button a document will be generated that includes:

-   Content authored with markdown
-   Output from executable code

Run Code Online (Sandbox Code Playgroud)