【问题标题】:z-index on a table row not working表格行上的 z-index 不起作用
【发布时间】:2014-12-17 16:29:13
【问题描述】:

我有一个表格和一个垂直 div,假设它位于除一个之外的所有行的顶部。它有position:absolute; z-index:1,行有position:relative; z-index:2,但它不起作用。

http://codepen.io/ilyador/pen/XJKjVw/?editors=110

灰色垂直线 (.marker) 应位于 40Db 行 (.current-volume) 下方,并且像现在一样在所有其他行中可见。

【问题讨论】:

    标签: html css position z-index


    【解决方案1】:

    我不确定tr 元素是否可以采用这种方式使用 z-index,但如果您将 z-index 应用于嵌套的 td 元素,它似乎可以正常工作。但是,您需要为它们而不是行应用背景,这样您就不会看穿它们。

    【讨论】:

      猜你喜欢
      • 2014-08-07
      • 1970-01-01
      • 2017-07-29
      • 2013-03-02
      • 2013-12-29
      • 2014-03-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多