css - 位置固定且top>0时的隐藏内容

标签 css offset fixed

Here is my example如果您尝试向下滚动,您将只能看到一些内容,而您无法查看最后几行。我该如何解决这个问题?

div#scrollable {
    overflow-y: scroll;
    height: 100%;
    position: fixed;
    top: 100px;
}

我需要:

  • 固定div;
  • 从顶部偏移一些值;

谢谢

最佳答案

尝试以下操作:

div#scrollable {
    overflow-y: scroll;
    position: fixed;
    top: 100px;
    bottom: 0;
    width: 100%;
}

查看演示:http://jsfiddle.net/audetwebdesign/a8dxhLra/

关于css - 位置固定且top>0时的隐藏内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25935584/

相关文章:

c# - 不能直接从 "this"对象使用固定大小的缓冲区

iframe - Internet Explorer修复了YouTube嵌入定位问题

javascript - 选择复选框以过滤匹配所有选择的结果

javascript - 从固定标题偏移页面 anchor

excel - 尝试使用偏移和间接从 1 列数据中创建 2 列

linux - 如何使用 xxd 向 hexdump 插入偏移量?

ruby-on-rails - 使用 css 更改 rails 中字段的外观

html - 使按钮变窄而不是让它水平填满整个屏幕

javascript - 单击 anchor 标记时添加效果

html - 修复了菜单问题,修复后菜单垂直堆叠