Home | History | Annotate | Download | only in fullscreen
      1 <style>
      2     body { background: green; color: white; }
      3     document:-webkit-full-screen-document > body { background: red;  }
      4     span { text-decoration: underline; cursor: hand; }
      5     div {
      6         background: blue;
      7         width: 200px;
      8         height: 100px;
      9     }
     10     div:-webkit-full-screen {
     11         width: 100%;
     12         height: 100%;
     13     }
     14 </style>
     15 <script>
     16 function toggleFullScreen() {
     17     if (document.webkitIsFullScreen)
     18         document.webkitCancelFullScreen();
     19     else
     20         document.getElementsByTagName('div')[0].webkitRequestFullscreen();
     21 }
     22 </script>
     23 <body>
     24     This tests that the page does not have a visible "flash" when finishing the exit full screen animation.
     25     <span onclick="toggleFullScreen()">Click to toggle full screen.</span>
     26     <div>
     27     </div>
     28 </body>