[英]Change the color of header in Rmarkdown Prettydoc templates
最简单的方法是覆盖 Bootswatch Cayman 主题 CSS。
要获取用于“沿直线在两种或多种颜色之间进行渐进式过渡”的linear-gradient()
CSS 函数的默认值,您可以“右键单击网页上的元素并选择Inspect Element ”:
想知道在哪里可以改变超越的颜色,所以也许它可以从红色变成橙色......
因此,应用 CSS 线性渐变语法:
background-image: linear-gradient(direction, color-stop1, color-stop2, ...);
---
title: Nineteen Years Later
author: Harry Potter
date: July 31, 2016
output:
prettydoc::html_pretty:
theme: cayman
highlight: github
---
```{css my-header-colors, echo = FALSE}
.page-header {
background-image: linear-gradient(120deg, red, orange);
}
```
此标头的 .css 位于何处?
Github: https : //github.com/yixuan/prettydoc/blob/master/inst/resources/css/cayman.css
Windows (PC): ..\\R\\win-library\\4.0\\prettydoc\\resources\\css\\cayman.css
这有什么帮助吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.