我正在通过VScode使用Marpit。以下是mi的最小工作示例:
---
marp: true
---
This should go in to the header and picture should be bellow it, but right now it is the middle of the picture

这段代码的问题是,它会生成幻灯片,其中文本和图像居中对齐,如下图所示:
我想有一个标题的文本,而不是交叉图像。
我如何才能做到这一点?
发布于 2021-09-16 13:01:15
在Marpit中,您可以使用image syntax来实现基本的图像修改。在许多情况下,它适合缩放图像,而不是将其放在背景中。对于标题,通常使用前导标签。考虑以下几点
---
marp: true
theme: default
style: |
img[alt~="center"] {
display: block;
margin: 0 auto;
}
---
## A Beautiful Headline

我在其中添加了center
以水平对齐图像,从而生成此幻灯片:
这是一个品味问题,但我倾向于使用justify-content
的以下安排来将标题放在顶部
---
marp: true
theme: default
style: |
section{
justify-content: flex-start;
}
---
## A Beautiful Headline
- some valid point
- another interesting fact
- even more convincing

因为它为信息性文本留出了空间,如下所示
https://stackoverflow.com/questions/69154809
复制相似问题