如何对齐幻灯片左页边距的列表项??
似乎revealjs
始终使用最长的列表项文本,将其置于幻灯片中,然后左对齐此下的所有其他列表项:
---
title:
output:
revealjs::revealjs_presentation
---
## list items
* a
* picture
* says more
* than a thousand words
or
1. item 1
1. item 2
我试图在幻灯片标题后嵌入CSS样式表,但是 它没有影响:
<style type="text/css">
.reveal li {
text-align: left;
}
</style>
PS:我正在使用带有revealjs
包的RStudio。
答案 0 :(得分:10)
我找到了解决方案。
对于一致的布局,我不仅使用无序和有序列表项对齐,还使用以下嵌入样式对齐文本段落:
---
title:
output:
revealjs::revealjs_presentation
---
## list items
<style type="text/css">
.reveal p {
text-align: left;
}
.reveal ul {
display: block;
}
.reveal ol {
display: block;
}
</style>
* a
* picture
* says more
* than a thousand words
or
1. item 1
1. item 2
来源:
您可以浏览揭示js定义的样式列表,以找出活动属性值:
https://github.com/hakimel/reveal.js/blob/master/css/theme/template/theme.scss
检查不同属性值的语义以找到所需的布局,例如: G。对于display
属性: