如何在 Quarto 中更改标题横幅大小?

4

我有一个带有Quarto HTML选项的qmd文件title-block-banner: true。如何修改横幅的大小以减小宽度?

---
title: "Cars"
title-block-banner: true
format: 
  html:
    code-fold: true
    page-layout: full
    fig_caption: yes
---
::: panel-tabset 
## MTCars

```{r}
head(mtcars)

```
## Cars

```{r}
head(cars)

```
:::
1个回答

2
您可以通过修改默认样式来完成这项任务: Qmd文件:
---
title: "Cars"
title-block-banner: true
format: 
  html:
    code-fold: true
    page-layout: full
    fig_caption: yes
---

<style>

#title-block-header {
  margin-block-end: 1rem;
  position: relative;
  margin-top: -1px;
  height: 75px;
}

.quarto-title-banner {
  margin-block-end: 1rem;
  position: relative;
  margin-top: -30px;
  height: 85%;
}

</style>

::: panel-tabset 
## MTCars

```{r}
head(mtcars)

```
## Cars

```{r}
head(cars)

```
:::

输出:

输入图像描述


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接