【问题标题】:I need to put a div OVER a scrollbar我需要在滚动条上放一个 div
【发布时间】:2018-04-05 23:35:33
【问题描述】:

我有一个我正在使用的 tumblr 主题,其中有一个滚动溢出容器和一个重叠的分页 div。但是那个 div 的滚动条会打断分页链接,越过它而不是越过它。将滚动条放在顶层分页 div 后面的最佳方法是什么?

Example here

【问题讨论】:

    标签: html css scrollbar tumblr tumblr-themes


    【解决方案1】:

    既然你已经在使用绝对定位,为什么不让分页 div 成为容器的兄弟,并使用:

    #pagif {
        position: absolute;
        left: calc(50% - 270px)
    }
    

    我对这个例子进行了测试,它和以前一样在同一个地方,但现在它在容器上方。

    请查看codepen

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-02-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-11-23
      • 2014-05-08
      • 2021-01-09
      • 2020-09-30
      相关资源
      最近更新 更多