Fragments in reveal.js using Markdown

Uwe L. Korn picture Uwe L. Korn · Dec 4, 2012 · Viewed 15.6k times · Source

reveal.js supports fragments which will be shown one after another in HTML:

<section>
    <p class="fragment grow">grow</p>
    <p class="fragment shrink">shrink</p>
    <p class="fragment roll-in">roll-in</p>
    <p class="fragment fade-out">fade-out</p>
    <p class="fragment highlight-red">highlight-red</p>
    <p class="fragment highlight-green">highlight-green</p>
    <p class="fragment highlight-blue">highlight-blue</p>
</section>

It supports using Markdown instead of HTML for each slide using:

<section data-markdown>
    ## Page title

    A paragraph with some text and a [link](http://hakim.se).
</section>

But I could not find any documentation on using fragments with Markdown. Did I miss something or is it not yet supported?

Answer

Fancyoung picture Fancyoung · Feb 11, 2014

It support attributes now, by adding tag: <!-- .element: class="fragment" -->.

There are more attributes supported such as background, index, etc. See more examples on official doc: Element Attributes, Slide Attributes.