在Jupyter Slideshow中工作,我希望片段的外观在上一个片段中设置属性。例如
第一个单元格:
单元格类型:降价幻灯片类型:幻灯片
<p id="demo">When then next fragment appears,I want the background to be red.</p>
第二个单元格:
单元格类型:Markdown 幻灯片类型:片段
This fragment appears and the previous has now red background!
我尝试过
<script>
function myFunction() { document.getElementById("demo").style.background-color = "red"; }
Reveal.addEventListener( 'fragmentshown',myFunction );
</script>