【问题标题】:jquery superslides vertical height issuejquery superslides垂直高度问题
【发布时间】:2015-10-30 10:23:20
【问题描述】:

我正在使用一个名为 jquery Superslides (https://github.com/nicinabox/superslides) 的插件,它通常工作得很好,但是我遇到了一个棘手的问题。高于窗口的内容会导致背景图像无法覆盖整个屏幕,如下例所示:http://fantasyhighstreet.org.uk/index.php?page=crystal-palace-2015

左侧的菜单包含在一个覆盖在滑块顶部并使用绝对定位的 Div 中,因此如果窗口高度无法容纳菜单框的高度,则会出现垂直滚动条。如果向下滚动,在幻灯片背景图像停止的地方会有一个难看的空白。

我曾尝试对菜单 div 使用固定定位,但是如果它不够高,这会导致看不到滚动条,并且菜单框会从窗口底部消失。

有没有办法让垂直滚动的内容不会导致幻灯片图像被截断?

谢谢!

【问题讨论】:

    标签: jquery css


    【解决方案1】:

    要实现您想要的,您必须在需要时让左侧菜单滚动。

    CSS

    .leftbox {
      background-color: #fff;
      border-radius: 8px;
      height: auto;
      left: 20px;
      opacity: 0.9; 
      padding: 10px;
      position: absolute;
      top: 20px;
      width: 200px;
      z-index: 999;
      overflow: auto; // Set this
      bottom: 20px; // Set this - adjust your needs
    }
    

    【讨论】:

    • 别忘了bottom: 20px;调整您的需求
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-01-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-10-02
    • 2018-07-12
    • 2012-05-20
    相关资源
    最近更新 更多