How to make the window full screen with Javascript (stretching all over the screen)

后端 未结 19 1800
天涯浪人
天涯浪人 2020-11-21 22:13

How can I make a visitor\'s browser go fullscreen using JavaScript, in a way that works with IE, Firefox and Opera?

19条回答
  •  不思量自难忘°
    2020-11-21 22:44

    Try screenfull.js. It's a nice cross-browser solution that should work for Opera browser as well.

    Simple wrapper for cross-browser usage of the JavaScript Fullscreen API, which lets you bring the page or any element into fullscreen. Smoothens out the browser implementation differences, so you don't have to.

    Demo.

提交回复
热议问题