Page Down键的可用性和页面顶部的固定位置栏
|
如果您像许多网站一样在页面顶部有一个绝对定位(固定的位置)的栏,它将破坏Page Down按钮(以及Page Up)的行为。向下翻页不但不会在屏幕顶部留下一行或大约一行文本,而在文本顶部之前会在屏幕底部留下一行或多行文本,以使继续阅读变得更容易,但有些中断却很烦人。这是一个人为的例子。有什么方法可以解决此问题(除了避免在页面顶部放置固定位置的条)?
为了后代,下面重复上述链接示例的源代码:
<!doctype html>
<html lang=\"en\">
<head>
<style type=\"text/css\">
#bar {
background: #f00;
height: 200px;
position: fixed;
top: 0;
width: 100%;
}
p {
margin-top: 250px;
}
</style>
</head>
<body>
<div id=\"bar\">IMPORTANT STUFF GOES HERE</div>
<p>When you press Page Down (and then Page Up the other way), some of the list items are cut off below the red bar.</p>
<ol><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li><li></ol>
</body>
</html>
我发现其他人已经在问这个问题,但是看来他唯一的答案是有人误解了这个问题。希望我的问题(包括示例)更加清楚,有人可以帮助我。
没有找到相关结果
已邀请:
1 个回复
薄响