I have a Reveal.js slide show that uses a lot of background images:
<section data-background="latimes.png">
<small class="caption">[Some Text](http://a.link.com/whatever)</small>
<aside class="notes">some notes</aside>
</section>
And I'd like to put a caption/link for each image on the lower left-hand corner of each slide.
I tried setting a custom class
.reveal .caption a {
background: #FFF;
color: #666;
padding: 10px;
border: 1px dashed #999;
}
.reveal .caption {
postion: absolute;
bottom: 0px;
left: 50px;
}
But it doesn't seem to have any impact on the layout. The element inspector doesn't seem to work well with Reveal.js, which makes this hard to troubleshoot. Is there a good way to force a block of text to a corner of the screen in reveal.js?
The reason this might be a bit tricky is because the parent nodes have some set defaults.
Set width and height to 100% in initialization of Reveal
:
Reveal.initialize({
width: "100%",
height:"100%"
});
Ensure that the slide (ie. section
) uses the whole space:
.full {
height:100%;
width:100%;
}
and finally set the position of the caption:
.caption {
bottom:0px;
right:0px;
position:absolute;
}
full code
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With