Home  >  Article  >  Backend Development  >  html css 如何样 让背景色随着 滚动条一直延续下去

html css 如何样 让背景色随着 滚动条一直延续下去

WBOY
WBOYOriginal
2016-06-13 13:45:331360browse

html css 怎么样 让背景色随着 滚动条一直延续下去?
也就是说 我的工做区域超过了 显示器的 上下高度,但是我的背景颜色已经 到了一定的高度就么有了 ~~比较简单的一个问题

------解决方案--------------------
自适应浏览器的高度

HTML code

<script>
var main=document.documentElement.clientHeight;
document.getElementById("block").style.height = main+"px";
</script>
<div id="block"></div> <div class="clear">
                 
              
              
        
            </div>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn