简体   繁体   English

如何在reveal.js中切换片段

[英]how to toggle fragments in reveal.js

I have a line: 我有一条线:

<div class="group2 big">starting as a<br>computer programmeur</div>

And initially all the text should be visible and normal. 最初所有文本都应该是可见的和正常的。 After "next" I want computer to be red. 在“下一步”之后,我希望电脑变红。 2nd "next" computer should be normal again. 第二台“下一台”电脑应该再次正常。 3rd "next" programmer should be red. 第三个“下一个”程序员应该是红色的。 I tried some combinations with nested fragments but that did not give the wanted behaviour. 我尝试了一些嵌套片段的组合但是没有给出想要的行为。 How can this be done? 如何才能做到这一点?

<div class="group2 big">starting as a<br><span class="fragment highlight-red"><span class="fragment fade-in">computer</span></span> <span class="fragment highlight-red">programmeur</span></div>

class="fragment highlight-current-red"就是我要找的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM