This content originally appeared on DEV Community and was authored by ali-dev-hash
Enter Full-Screen Mode with JavaScript - Fullscreen
demo == > https://codepen.io/Bilal1909/full/XWpOQEO
How to use JavaScript to view an element in fullscreen mode
To open an element in fullscreen, we use the element.requestFullscreen() method:
Fullscreen Document
To open the whole page in fullscreen, use the document.documentElement instead of document.getElementById("element"). In this example, we also use a close function to close the fullscreen:
This content originally appeared on DEV Community and was authored by ali-dev-hash
ali-dev-hash | Sciencx (2021-04-27T10:49:42+00:00) Enter Full-Screen Mode with JavaScript – Fullscreen. Retrieved from https://www.scien.cx/2021/04/27/enter-full-screen-mode-with-javascript-fullscreen/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.