首页 > 解决方案 > Rmarkdown中的YAML标题字体和颜色

问题描述

有没有办法在 R markdown flexdashboard 中更改 YAML 标题中的字体和颜色?这是我要更改的 YAML 标头的代码:

---
title: "Greenhouse gases and weather data"
fontsize: 30
output: 
  flexdashboard::flex_dashboard:
    orientation: rows
    vertical_layout: fill
    social: menu
    source_code: embed
    theme: readable

---

标签: ryamlr-markdowntitleflexdashboard

解决方案


另一种选择是在仪表板的任何位置添加 CSS 代码块

```{css}

body > div.navbar.navbar-inverse.navbar-fixed-top > div > div.navbar-header > span.navbar-brand {
  
    font-size: 26px;
    color: red;
}

```

推荐阅读