Advertisement
Guest User

fullscreen

a guest
Oct 26th, 2023
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 0.78 KB | Source Code | 0 0
  1. <!-- https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API -->
  2. <!DOCTYPE html>
  3. <html lang="en">
  4.   <head>
  5.     <meta charset="UTF-8" />
  6.     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  7.     <title>Document</title>
  8.     <style>
  9.         #fs-toggle:fullscreen {
  10.         background-color: #faa;
  11.       }
  12.  
  13.       #fs-toggle:not(:fullscreen) {
  14.         background-color: #afa;
  15.       }
  16.     </style>
  17.   </head>
  18.   <body>
  19.     <h1>MDN Web Docs Demo: :fullscreen pseudo-class</h1>
  20.  
  21.     <p>
  22.       This demo uses the <code>:fullscreen</code> pseudo-class to automatically
  23.       change the style of a button used to toggle fullscreen mode on and off,
  24.       entirely using CSS.
  25.     </p>
  26.  
  27.     <button id="fs-toggle">Toggle Fullscreen</button>
  28.   </body>
  29. </html>
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement