Redraw page border on scroll

大城市里の小女人 提交于 2019-12-11 06:30:01

问题


My webpage content is centered in the middle using auto margin and has a black border on both sides (left and right).

If I scroll down, the border doesn't update. So if I scroll down a bit the border will only reach half way down. How do i fix this?

Edit: The height of the content div is set to 100% and on initial load the border does go all the way down, this problem only occurs when scrolling.


回答1:


The height of the content div is set to 100%

This is likely your problem. Because you've set the div to height: 100% it's only as tall as the viewport. (Even though the content overflows out of it.)

Try: min-height: 100%



来源:https://stackoverflow.com/questions/13059757/redraw-page-border-on-scroll

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!