我可以将reveal.js幻灯片对齐到页面顶部吗? [英] Can I align reveal.js slides to the top of the page?
问题描述
我正在使用reveal.js,试图找出如何将幻灯片强制移到页面的最左上角。似乎应该很简单,但是当我使用元素检查器时,它会彻底改变页面,以至于我甚至无法开始将幻灯片上移到顶部的方法归零。
I'm using reveal.js and trying to sort out how to force my slides to the top left-most corner of the page. That seems like it should be straightforward, but when I use the Element inspector it so radically changes the page that I can't even begin to zero in on how to move the slides up to the top.
将此添加到我的主题中:
Adding this to my theme:
.reveal .slides>section,
.reveal .slides>section>section {
padding: 0;}
将其撞倒(reveal.css的填充设置为 20px 0
),但是每张幻灯片的顶部仍然有空白。
Bumped it up a smidge (reveal.css has the padding set to 20px 0
) but there's still white space at the top of each slide.
推荐答案
要将幻灯片移到顶部只是一个配置显示.js的选项。
To move your slides to the top is just a configuration option of reveal.js.
Reveal.initialize({
center: false
}
我还没弄清楚如何将它们向左移动。
可以从CSS中进行水平对齐:
Horizontal alignment can be done from CSS:
.reveal .slides { margin: 0; }
这篇关于我可以将reveal.js幻灯片对齐到页面顶部吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!