Set header and footer reveal.js presentation

后端 未结 2 1811
萌比男神i
萌比男神i 2021-02-13 10:28

I want to set a header and footer in my presentation. I used the following issue as a starting point: https://github.com/hakimel/reveal.js/issues/806 and http://www.ciges.net/re

2条回答
  •  梦毁少年i
    2021-02-13 11:30

    Here is a slightly more complicated answer that also works with the pdf-export print version:

    Add the elements to the slide-background

    (instead of section, slides, or reveal). This
    is dynamically generated, so we must wait for the Reveal.js ready event. When printing there is a slight delay followed by unnecessary animation of the headers and footers moving into place, but all the headers/footers are rendered in the PDF as desired.

    Pseudo-code:

    1. Style header/footer
      so they are positioned as desired.
    2. Create hidden header/footer
    3. On Reveal.js ready event, copy header/footer
      into each .slide-background

    Code: this can be copy-pasted into the end of a reveal.js file (right before the end tag):

    
    
    
    
    
    
    
    

提交回复
热议问题