【发布时间】:2015-12-06 16:21:15
【问题描述】:
很多网站都有这样的东西,如果你一直向上滚动,你会得到这种“弹跳”效果,就好像你的页面从浏览器窗口的顶部弹开,在窗口顶部显示空白。
同样的情况,如果你向下滚动,你会得到完全相同的“反弹”效果。
如果您的页眉和页脚有背景颜色,则此反弹可能会非常难看。
如何消除这种影响?
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<header></header>
<div></div>
<footer></footer>
</body>
</html>
CSS
header {
width: 100%;
background-color: tomato;
height: 140px;
}
div {
height: 1000px;
}
footer {
width: 100%;
background-color: brown;
height: 140px;
}
【问题讨论】:
-
这能回答你的问题吗? Prevent "overscrolling" of web page