css - Xaringan 标题幻灯片

标签 css r xaringan

在 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/

相关文章:

css - 如何在不将其上传到元素的情况下使用 FontAwesome 字体图标?

R包警告: Files in the 'vignettes' directory newer than all files in 'inst/doc'

r - xaringan:更改长宽比的简便方法?

html - 使文本显示为绿白色背景

css - 通过 CSS Transform 打开侧边菜单时防止正文滚动

css - Content-Type 仍然得到 "Resource interpreted as Image but transferred with MIME type text/css."是正确的吗?

sql - RODBC sqlSave表创建问题

r - 在ggplot2中创建一个新的比例

xaringan - 如何在 xaringan/remark.js 中包含 javascript 库?

r - 使用 xaringan 和 plotly 以编程方式在 R 中生成幻灯片