Skip to content

Instantly share code, notes, and snippets.

@ladyrick
Created May 19, 2017 07:46
Show Gist options
  • Save ladyrick/5f28cdf91f231a05b33c5ba65fd9481a to your computer and use it in GitHub Desktop.
Save ladyrick/5f28cdf91f231a05b33c5ba65fd9481a to your computer and use it in GitHub Desktop.
html 不显示滚动条,但是可以向下滚动
<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