我試圖用Rstudio和quarto制作一個reavaljs演示的標題幻燈片。我希望我的標題幻燈片有完整的背景圖像和底部的一個或多個小圖標(但不是在其他幻燈片)。我試圖修改這種方法,但沒有任何成功。這是我的。qmd YAML和css:
---
title: "Test Presentation"
author: "Name"
format:
revealjs:
embed-resources: true
css: css/slides.css
editor: source
---
slides.css
.title-slide {
background-image: url(https://placeholder.pics/svg/100),
url(https://picsum.photos/id/870/800/600?grayscale);
background-position: 2% 98%, center;
background-size: 100px, cover;
}
您也可以使用標題-幻燈片-屬性對Quarto revealjs進行同樣的操作。
只需以字符串形式傳遞圖像路徑(用逗號分隔)。
---
title: "Test Presentation"
author: "Name"
format: revealjs
title-slide-attributes:
data-background-image: "https://placeholder.pics/svg/100,https://picsum.photos/id/870/800/600?grayscale"
data-background-size: 100px, cover
data-background-position: 2% 98%, center
---
## Quarto
Quarto enables you to weave together content and executable code into a finished presentation.
## Bullets
When you click the **Render** button a document will be generated that includes:
- Content authored with markdown
- Output from executable code
感謝@shafee,這個問題解決了。顯然,embed-resources與復(fù)雜的標題幻燈片不兼容。這太糟糕了,因為我通常不能為一個會議提供一個文件夾——他們想要一個單獨的文件供我展示和分享。我不確定這是不是一個bug,但這肯定是quarto/posit開發(fā)人員需要考慮的一個設(shè)計特性。
然而,從短期來看,這是件好事。謝謝你的幫助!
---
title: "Test Presentation"
author: "Name"
format:
revealjs:
theme: night
scrollable: true
echo: true
incremental: false
code-fold: true
code-overflow: scroll
embed-resources: false
title-slide-attributes:
data-background-image: "https://placeholder.pics/svg/100, https://placeholder.pics/svg/100,https://placeholder.pics/svg/100, https://picsum.photos/id/870/800/600?grayscale"
data-background-size: 100px, 100px, 100px, cover
data-background-position: "2% 98%, 50% 98%, 98% 98%, center"
editor: source
---
這會產(chǎn)生: