我想创建一个Quarto 仪表板,其中我的标注块的宽度与页面宽度不同。现在它使用整个页面宽度,这不是我想要的。以下是一些可重现的代码:
---
title: "Test"
format: dashboard
---
# Test
<h1>This is an example!</h1>
I'm trying to change the width of my callout-block below!
::: {.callout-note}
Note that there are five types of callouts, including:
`note`, `warning`, `important`, `tip`, and `caution`.
:::
输出:
如您所见,它使用了仪表板的整个宽度。但是我只想使用 30% 的宽度。我尝试使用此处描述的一些 CSS ,但它对我来说不起作用。所以我想知道是否有人知道如何更改 Quarto 仪表板中此标注块的宽度?
您可以使用
!important
它来确保样式属性覆盖在其他地方设置的任何其他属性:一个文件
单独的文件
如果您喜欢单独的文件。您可以在这里获得
dashboard.qmd
:然后
styles.css
: