如何在Rmarkdown (xaringan)中添加图像到标题幻灯片?



我正在用xaringan做演示。我想在标题幻灯片的背景上加上我学校的标志。我还想知道如何设置这个图像的位置

Mi代码如下:

--- 
title: "My presentations"
author: "My name"
date: "`r Sys.Date()`" 
output:
xaringan::moon_reader:
chakra: libs/remark-latest.min.js
css: [xaringan-themer.css, my-theme.css]
nature:
countIncrementalSlides: false
titleSlideClass: ["left", "middle", "inverse"]
highlightLines: true
highlightStyle: solarized-dark
includes:
in_header: header.html
---

这是my-theme.css文件

.title-slide a, a > code {
color: #aadff2;
text-decoration: none;
}
}
div.my-footer {
background-color: #E7EEF0;
position: absolute;
bottom: 0px;
left: 0px;
height: 30px;
width: 100%;
}
div.my-footer span {
font-size: 14pt;
color: #005f9b;
position: absolute;
left: 20px;
bottom: 10px;
}
.inverse {
background-color: #13306a;
color: #E7EEF0;
}

当我在制作我的主题时,这对我很有效。我参考了Joseph V. Casillas的Rutgers主题和two Wang的UW Madison主题。

.title-slide {
background-image: url(https://commkit.gsu.edu/files/2019/06/PrimaryLogo3color.jpg);
background-position: 100% 0%; ## just start changing this
background-size: 300px;
background-color: #fff;
padding-left: 100px;  /* delete this for 4:3 aspect ratio */
}

最新更新