====== Markup and Code-Behind Examples for reveal.js ======
===== Markup =====
==== Animate Slide Transitions ====
The ''data-auto-animate'' decorator causes automatic display transition styling of matching header markup on slides.
Contents Contents Hit the next arrow... ... to step through ... ... a fragmented slide.
==== Block Quote ====
Slide One
Slide Two
==== Fragments ====
Show text incrementally on a slide:
Text of block quote.
==== Image Backgrounds ====
Fragments
==== Scale Image ====
Data Backgrounds
==== Small Text ====
Nice formatting for long paragraphs.
Text of paragraph.
==== Syntax Highlighting ====
printf("Hello!\n");
for (var slide of document.getElementsByTagName('section')) {
if (!(slide.getAttribute('data-background') || slide.getAttribute('data-background-video') || slide.getAttribute('data-background-iframe') || slide.getAttribute('data-background-image'))) {
slide.setAttribute('data-background-image', 'img/default-background.png')
}
}
==== Make Text Stand Out ====
For text that is hard to read, you can make it stand out by enclosing it in a translucent box.
First, create a css/custom.js file, and add this style:
.background-box-black {
background-color: rgba(0, 0, 0, 0.8);
color: #fff;
padding: 20px;
}
Include the custom CSS in your index.html:
Then, use it in a slide like this:
Some text!
Here's some additional CSS for enhancing text display:
.green-bold {
color: green;
font-weight: bold;
}
.red-bold {
color: red;
font-weight: bold;
}
.blue-bold {
color: blue;
font-weight: bold;
}
.simple-quote {
background-color: rgba(0, 0, 0, 0.8);
font-style: italic;
}
.force-italic {
font-style: italic;
}