所以我希望我的 div 背景滚动到窗口的高度,即使你向下滚动。
然而,它似乎只是原始窗口大小的高度。当我向下滚动时,我看到了我身体的背景。
我在这个网站上搜索过类似的问题,我发现的只是使用 height: 100%; 但这不起作用。
这是我的 CSS 代码:
div#graycontainer {
margin: auto;
margin-top: 50px;
width:1000px;
background-color: #D9D9D9;
height: 100%;
/*box-shadow: 10px 10px 7px #888888;*/
/*border: 3px solid #888889;*/
border-radius: 1px;
}
我不相信我的其他代码有任何问题,并且将此站点用作最后的手段。
谢谢你的帮助!