Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API -->
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <title>Document</title>
- <style>
- #fs-toggle:fullscreen {
- background-color: #faa;
- }
- #fs-toggle:not(:fullscreen) {
- background-color: #afa;
- }
- </style>
- </head>
- <body>
- <h1>MDN Web Docs Demo: :fullscreen pseudo-class</h1>
- <p>
- This demo uses the <code>:fullscreen</code> pseudo-class to automatically
- change the style of a button used to toggle fullscreen mode on and off,
- entirely using CSS.
- </p>
- <button id="fs-toggle">Toggle Fullscreen</button>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement