您可以使用Pandoc Lua filters自动使用inverse
类,将background-color="black"
用于所有级别1标头.
MWe
---
title: "Level 1 header"
format: revealjs
keep-md: true
filters: [bg_style.lua]
---
```{css, include=FALSE}
.inverse h1 {
color: white;
}
```
## Quarto
Quarto enables you to weave together content and executable code into a finished presentation. To learn more about Quarto presentations see <https://quarto.org/docs/presentations/>.
# Level 1 header
## Bullets
When you click the **Render** button a document will be generated that includes:
- Content authored with markdown
- Output from executable code
# Level 1 header
## Code
When you click the **Render** button a presentation will be generated that includes both content and the output of embedded code. You can embed code like this:
```{r}
1 + 1
```
bg_style.lua个
function Header(el)
if el.level == 1 then
table.insert(el.classes, "inverse")
el.attributes["data-background-color"] = 'black'
return el
end
end