Set header and footer reveal.js presentation

后端 未结 2 1805
萌比男神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条回答
  •  一向
    一向 (楼主)
    2021-02-13 11:23

    Insert the header/footer elements into the div.reveal element instead of the .slides slides element.

    The position within the DOM tree you where insert the header/footer elements affects which CSS is applied, which in turn affects their positioning.

    • $('.slides').prepend(header) adds the elements inside the slides
      . The elements will be fixed to the default (960x700) window because that is how the slides
      is sized.
    • $('div.reveal').append(header) adds the elements inside the reveal
      . The elements will be fixed to the screen because the reveal
      is sized to take up the entire browser view port.

    Note this does not work for the print/pdf version... I'm still trying to figure that one out...

提交回复
热议问题