如何使用全屏API在 Internet Explorer 11 中获得全屏模式的垂直滚动条? Internet Explorer 11.0.9600.18163 Windows 7
我尝试了以下内容:
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
window.onload = function(){
function makeFullscreen() {
console.log("makeFullscreen");
document.documentElement.msRequestFullscreen();
}
function exitFullscreen() {
document.msExitFullscreen();
}
document.getElementById("fullscreen").onclick = makeFullscreen;
document.getElementById("exitFullscreen").onclick = exitFullscreen;
}
</script>
<style>
div {
width: 200px;
height: 3000px;
background-color: red;
}
:-ms-fullscreen {
overflow: scroll;
}
</style>
</head>
<body>
<button type="button" id="fullscreen">
make fullscreen
</button>
<button type="button" id="exitFullscreen">
exit fullscreen
</button>
<div>
great div
</div>
</body>
</html>
我检查了以下示例: