首页 > 解决方案 > 如何在 .RPres R 演示文稿中编辑标题幻灯片样式?

问题描述

我在编辑 .RPres R 演示文稿中的标题幻灯片样式时遇到问题。我正在使用 .css 文件来设置样式,并且已经尝试过:

.title-slide{
text-align: center;
background-color: white;
background-size: cover;
color: black;
font-family: 'Montserrat';}

但我唯一得到的是字幕标签上的白色背景,但幻灯片仍然具有默认样式。我在标题幻灯片中有以下代码:

Title of the presentation
========================================================
class: title-slide
author:
autosize: true
css: prueba1.css

Subtitle of the title slide

如果有人能告诉我如何删除标题幻灯片,它也会有所帮助。我在 linux x86_64 虚拟机上使用 R 版本 3.4.4。

标签: cssrr-markdownrpres

解决方案


我已经找到了如何编辑它。第一张幻灯片恰好是“部分”类型,因此,要编辑其样式,我必须在 css 中编写:

.section .reveal .state-background{
background-color: white;
background-size: cover;
}

用我想要的颜色设置背景,并且:

.section .reveal h1, h2{
    color: black;
    font-weight: bold;
  }

这样我就可以制作出我想要的风格的第一张幻灯片。我唯一无法编辑的是作者和日期。有谁知道这些标签是什么?


推荐阅读