我正在尝试如何在RMarkdown a la http://rmarkdown.rstudio.com/revealjs_presentation_format.html中使用reveal.js幻灯片在标题幻灯片上包含居中的背景图像
我拥有的测试平台如下所示
---
title: "Attempt"
css: style.css
output: revealjs::revealjs_presentation
---
## Will this work
- Did the title slide have an image?使用style.css作为
.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%;
}请注意,.title是唯一可以在标题幻灯片上显示任何图像的东西。根据我在SO和其他地方看到的情况,我已经尝试了其他一些组合。
基于Rstudio 0.98.1028 add background image only to title slide的.section .reveal .state-background
基于Adding an image to title slide using slidify的.title-slide
这些都不起作用。我是不是遗漏了什么?也许我遗漏了一个神奇的YAML选项?
发布于 2016-10-25 09:06:35
好的,这是一个简单的答案。基本上,制作一个空白标题,然后在标题幻灯片上有一个图像作为您的数据背景。你也可以在标题幻灯片上做任何你想做的事情。我使用div在幻灯片的中间放置一个漂亮的大标题。
---
title:
output: revealjs::revealjs_presentation
---
## {data-background="http://img1.wikia.nocookie.net/__cb20100706023807/familyguy/images/c/c7/Tauntaun.png"}https://stackoverflow.com/questions/36777699
复制相似问题