我想改变flexdashboard的细条颜色.
我找到了一个删除它的例子 - SE 在这里,但鉴于我不知道任何CSS/JQuery,我不得不问.
我想将bar collor更改为红色,将文本更改为黑色.
任何人?
编辑(以下示例):
---
title: "DB: Contact information"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
---
<style>
.navbar {
background-color:crimson;
border-color:black;
}
.navbar-brand {
color:black!important;
}
</style>
Dashboard
=====================================
Test. Test. Test.
Column {data-width=650}
-----------------------------------------------------------------------
### Clustered Data
Run Code Online (Sandbox Code Playgroud)
您可以在<style>...</style>块中自定义样式表,如下所示:
---
title: "Untitled"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
---
<style>
.navbar {
background-color:red;
border-color:black;
}
.navbar-brand {
color:black!important;
}
</style>
```{r setup, include=FALSE}
library(flexdashboard)
```
Column {data-width=650}
-----------------------------------------------------------------------
### Chart A
```{r}
plot(0)
```
Column {data-width=350}
-----------------------------------------------------------------------
### Chart B
```{r}
plot(0)
```
### Chart C
```{r}
plot(0)
```
Run Code Online (Sandbox Code Playgroud)
或者使用
output:
flexdashboard::flex_dashboard:
css: styles.css
Run Code Online (Sandbox Code Playgroud)
将自定义样式放在单独的styles.css文件中.