简体   繁体   English

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

[英]How to change title banner size in Quarto?

I have the below qmd file with quarto html option title-block-banner: true .我有以下带有 quarto html 选项title-block-banner: true qmd 文件。 How do I modify the size of the banner to reduce width?如何修改横幅的大小以减小宽度?

---
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)

```
:::

You can do it in this way by modifying the default style:您可以通过修改默认样式来做到这一点:

Qmd-file: 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)

```
:::

Output: Output:

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM