在 xaringan 中,我想在标题幻灯片中添加背景。 我已经设法在 Yihui's 之后做到了这一点说明。
除了我松开默认字体 (Yanone Kaffeesatz) 外,这行得通。
YAML:
---
title: "My title"
subtitle: "My subtitle"
author: "Me Myself"
date: "01/01/2012"
output:
xaringan::moon_reader:
css: my-theme.css
lib_dir: libs
nature:
ratio: '16:9'
highlightStyle: github
highlightLines: true
countIncrementalSlides: false
---
其中 my-theme.css
如下:
.title-slide {
background-image: url(Figures/MyBackground.jpg);
background-size: cover;
}
最佳答案
我不建议您将 default-fonts.css
添加到您的 my-theme.css
。如果你想要默认字体,你可以使用
output:
xaringan::moon_reader:
css: [default, default-fonts, my-theme.css]
在 Section 7.5 中查看更多信息R Markdown 书籍。
关于css - Xaringan 标题幻灯片,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51793049/