Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change text color in different fragments

Tags:

reveal.js

Say I have a simple reveal.js slide like this:

 <section>
   <h1>Title</h1>
   <p >Text</p>
   <p class="fragment">Fragment</p>
 </section>

I'd like to change Text colour to red after Fragment appears on screen. How should I do it?

like image 853
Old Nick Avatar asked Oct 29 '13 11:10

Old Nick


1 Answers

You could simply do

<section>
  <h1>Title</h1>
  <p class="fragment highlight-red" data-fragment-index="1" >Text</p>
  <p class="fragment data-fragment-index="1"">Fragment</p>
</section>

That way, the red text and the "Fragment" text will always be in sync.

like image 185
gturri Avatar answered Dec 14 '22 05:12

gturri