如何在reveal.js中定位背景图片? [英] How to position a background image in reveal.js?
本文介绍了如何在reveal.js中定位背景图片?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在一个幻灯片的右边有一个背景图片在一个reveal.js演示文稿。
I want to have a background image on the right hand side of one slide in a reveal.js presentation.
我添加图像到幻灯片像这样:
I added the image to the slide like this:
<section data-background="myImage.jpg">
// content
</section>
如何添加css样式以使其出现在屏幕的右边?
How can I add css styles to make it appear on the right edge of the screen?
推荐答案
本文帮助找到解决方案。您可以使用
data-state="something"
当然你可以使用这种风格来调整css。所以我使用这个html:
and of course you can use that style for tweaking your css. So I used this html:
<section data-background="myImage.jpg" data-state="img-right">
// content
</section>
和以下css:
html.img-right div.slide-background.present {
background-position: right;
}
这篇关于如何在reveal.js中定位背景图片?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文