Created
May 19, 2017 07:46
-
-
Save ladyrick/5f28cdf91f231a05b33c5ba65fd9481a to your computer and use it in GitHub Desktop.
html 不显示滚动条,但是可以向下滚动
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body style="margin:0;"> | |
<div style="overflow:hidden;"> | |
<div id="box" style="width:110%;height:100%;overflow-x:hidden;overflow-y:auto;"> | |
</div> | |
</div> | |
<script> | |
box = document.getElementById("box"); | |
for (var r of ['0', 'f']) | |
for (var g of ['0', 'f']) | |
for (var b of ['0', 'f']) { | |
var div = document.createElement('div'); | |
div.style.height = "200%"; | |
div.style.backgroundColor = '#' + r + g + b; | |
box.appendChild(div); | |
} | |
</script> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment