28 lines
788 B
HTML
28 lines
788 B
HTML
<style>
|
|
body { background: green; color: white; }
|
|
document:-webkit-full-screen-document > body { background: red; }
|
|
span { text-decoration: underline; cursor: hand; }
|
|
div {
|
|
background: blue;
|
|
width: 200px;
|
|
height: 100px;
|
|
}
|
|
div:-webkit-full-screen {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
</style>
|
|
<script>
|
|
function toggleFullScreen() {
|
|
if (document.webkitIsFullScreen)
|
|
document.webkitCancelFullScreen();
|
|
else
|
|
document.getElementsByTagName('div')[0].webkitRequestFullscreen();
|
|
}
|
|
</script>
|
|
<body>
|
|
This tests that the page does not have a visible "flash" when finishing the exit full screen animation.
|
|
<span onclick="toggleFullScreen()">Click to toggle full screen.</span>
|
|
<div>
|
|
</div>
|
|
</body> |