在 rmarkdown 中将背景颜色从 blockquote 更改为 blockquote
Changing the background color from blockquote to blockquote in rmarkdown
获取以下 rmarkdown
文件。我想让每个 blockquote
呈现不同的背景颜色(第一个是黄色,第二个是白色),但是第二个 css
块似乎中和了第一个。
有人可以帮我吗?
---
title: "Untitled"
output: html_document
---
```{css echo = FALSE}
blockquote{
background-color: rgb(255,255,153);
}
```
> this is a note 1
>
> the is is still the note
```{css echo = FALSE}
blockquote{
background-color: initial;
}
```
> this is a note 2
>
> the is is still the note
试试这个解决方案:
<div style="background-color:rgba(250, 230, 7, 1);">
> this is a note 1
>
> the is is still the note
</div>
<div style="background-color:rgba(63, 237, 40, 1);">
> this is a note 2
>
> the is is still the note
</div>
获取以下 rmarkdown
文件。我想让每个 blockquote
呈现不同的背景颜色(第一个是黄色,第二个是白色),但是第二个 css
块似乎中和了第一个。
有人可以帮我吗?
---
title: "Untitled"
output: html_document
---
```{css echo = FALSE}
blockquote{
background-color: rgb(255,255,153);
}
```
> this is a note 1
>
> the is is still the note
```{css echo = FALSE}
blockquote{
background-color: initial;
}
```
> this is a note 2
>
> the is is still the note
试试这个解决方案:
<div style="background-color:rgba(250, 230, 7, 1);">
> this is a note 1
>
> the is is still the note
</div>
<div style="background-color:rgba(63, 237, 40, 1);">
> this is a note 2
>
> the is is still the note
</div>