Is it possible to use pseudo-elements (:after, :before) inside a table row?

前端 未结 2 1234
Happy的楠姐
Happy的楠姐 2020-12-19 01:40

I want to add absolutely positioned element as an :after (of :before) of a table row.

Look at this:

2条回答
  •  一生所求
    2020-12-19 01:55

    Use the first table cell instead of the row as a host for the absolutely positioned pseudo-element.

    row > td:first-child::before {
      content: '';
      position: absolute;
      .
      .
    }
    

提交回复
热议问题