相关疑难解决方法(0)

使用reveal.js将标题幻灯片图像添加到RMarkdown幻灯片

我正在尝试弄清楚如何使用reveal.js幻灯片在标题幻灯片中包含居中的背景图像,同时在RMarkdown和http://rmarkdown.rstudio.com/revealjs_presentation_format.html中书写

我的测试平台如下

---
title: "Attempt"
css: style.css
output: revealjs::revealjs_presentation
---

## Will this work

- Did the title slide have an image?
Run Code Online (Sandbox Code Playgroud)

style.cssas

.title {
    background-image: url(http://img1.wikia.nocookie.net/__cb20100706023807/familyguy/images/c/c7/Tauntaun.png);
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    }
Run Code Online (Sandbox Code Playgroud)

注意,.title唯一能在标题幻灯片上显示任何图像的东西.我已经根据我在SO和其他地方看到的内容尝试了一些其他组合.

.section .reveal .state-background基于Rstudio 0.98.1028,仅将背景图像添加到标题幻灯片中

.title-slide基于使用slidify将图像添加到标题幻灯片

这些都不起作用.我错过了什么吗?也许我遗漏了一个神奇的YAML选项?

rstudio knitr r-markdown reveal.js

8
推荐指数
1
解决办法
2040
查看次数

标签 统计

knitr ×1

r-markdown ×1

reveal.js ×1

rstudio ×1