Classes
CSS classes could be applied
- to element by setting parameter in shortcode (if exists)
- to paragraph by using special comment after the paragraph
<!-- .element class="classes" -->
In following classes, <color> variable is equal to one of palette color (see Configuration page).
Fragments are used to highlight individual elements on a slide. Every element with the class fragment will be stepped through before moving on to the next slide.
The default fragment style is to start out invisible and fade in.
The default style can be changed by appending a different class to the fragment.
Possible styles are following
growto growshrinkto shrinkfade-outto fade-outfade-upto fade from upfade-downto fade from downfade-leftto fade from leftfade-rightto fade from rightfade-in-then-outto fades in, then out when we move to the next stepfade-in-then-semi-outto fades in, then obfuscate when we move to the next stephighlight-redto highlight in redhighlight-greento highlight in greenhighlight-blueto highlight in bluehighlight-current-redto highlight in red only when current fragmenthighlight-current-greento highlight in green only when current fragmenthighlight-current-blueto highlight in blue only when current fragmentfragment-text-<color>to text in<color>fragment-text-highlight-<color>to text highlight in<color>fragment-bg-<color>to background in<color>fragment-text-<style>to text in<style>fragment-current-text-<color>to text in<color>only when current fragmentfragment-current-text-highlight-<color>to text highlight in<color>only when current fragmentfragment-current-bg-<color>to background in<color>only when current fragmentfragment-current-text-<style>to text in<style>only when current fragment
Multiple fragments can be applied to the same element sequentially by wrapping it.
The display order of fragments can be controlled by
- using fragment index in
div/span/lishortcodes - using the
data-fragment-indexattribute in element attribute.
e.g.<!-- .element class="fragment" data-fragment-index="1" -->
Set background <color>.
Style the image with possible <style> values:
middleto vertical align with middle
Use rounded borders with text-highlight-<color> class.
Table rows are rendered using alternating stripped backgrounds
Example
|x|y|z|
|-|-|-|
|1|2|3|
|4|5|6|
|7|8|9|
|A|B|C|
<!-- .element class="table-zebra" -->
Empty line is mandatory between table and .element attribute.
Style the text with possible <style> values:
- Font Family
mainto use default fontcodeto use monospace font
- Alignment
leftto align to the leftrightto align to the rightcenterto align in the center
- Font Style
lighterto use lighter fontnormalto use normal fontboldto use bold fontitalicto use italic fontoverstriketo use overstrike fontuppercaseto uppercase textlowercaseto uppercase textcapitalizeto capitalize textsmallcapsto smallcaps text
- Font Size
01to50to size the font inem
Apply <color> to text.
Highlight text with <color>.
Column with equal width
Building a columns layout by following this steps
- Add a columns div
- Add as many column div as you want
Each column will have an equal width, no matter the number of columns.
Column sizes
If you want to change the size of a single column, you can use following classes
col-<percent>with<percent>equals to one of the following values- 10, 20, 30, 40, 50, 60, 70, 80, 90, 100
- 25, 50, 75
- 33, 66
col-<N>-12with<N>equals to one value from 1 to 12 (12 columns system)
Column offsets
While you can use empty columns to create horizontal space around column elements, you can also use col-off-
Columns options
col-vcenteredto align your columns vertically, add the col-vcentered modifier to the columns container.col-multilineAdd the col-multiline modifier and add more column elements than would fit in a single row.col-centeredWhile you can use empty columns (like{{< div "column" >}}{{< /div >}}) to create horizontal space around column elements, you can also usecol-centeredon the parent columns element.
Examples
{{< div "columns" >}}
{{< div "column" >}}First column{{< /div >}}
{{< div "column" >}}Second column{{< /div >}}
{{< div "column" >}}Third column{{< /div >}}
{{< div "column" >}}Fourth column{{< /div >}}
{{< /div >}}
{{< div "columns" >}}
{{< div "column col-off-10 col-30" >}}30%{{< /div >}}
{{< div "column col-50" >}}50%{{< /div >}}
{{< /div >}}
Set the size of margin in <direction> (top, bottom, left, right) with <percent> value from 1 to 100.
Set the size of margin in <direction> (top, bottom, left, right) with <percent> value from -1 to -100.
Set the size of element with <percent> value from one of following values:
- 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100
Sometimes it’s desirable to have a component, like an image or video, stretch to consume as much space as possible within a given slide. This can be done by adding the stretch class to a component. Only first descendant of a slide can be stretched.
See layout documentation page from Reveal.js for further information about following classes.