Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fragments in reveal.js using Markdown

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?

like image 988
Uwe L. Korn Avatar asked Dec 04 '12 15:12

Uwe L. Korn


2 Answers

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.

like image 140
Fancyoung Avatar answered Oct 04 '22 07:10

Fancyoung


If you are looking to create fragments inside a markdown formatted section as jez pointed out in his comment, this is what you need

* Item 1 <!-- .element: class="fragment" --> * Item 2 <!-- .element: class="fragment" --> 

Original source - https://stevegrunwell.com/blog/building-presentations-reveal-js/ (dead link)

There is another tutorial - http://htmlcheats.com/reveal-js/reveal-js-tutorial-reveal-js-for-beginners/

like image 40
vijayshankarv Avatar answered Oct 04 '22 09:10

vijayshankarv