Hide reveal.js fragments after their appearance

后端 未结 4 377
礼貌的吻别
礼貌的吻别 2021-01-04 10:56

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

first

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-04 11:34

    If you want to completely remove the space taken by the hidden element after it was shown, you can use the following CSS selector and properties:

    .fragment.current-visible.visible:not(.current-fragment) {
        display: none;
        height:0px;
        line-height: 0px;
        font-size: 0px;
    }
    

    Additionally if you don't want this behavior for other current-visible fragments, you can just add a custom class to your selector and HTML elements.

提交回复
热议问题