【发布时间】:2022-01-02 19:29:44
【问题描述】:
当伪元素tr::after 具有position: relative,而主元素tr 具有position: absolute 时,该伪元素在Safari 上的定位不正确。
你对如何让它在 Safari 上运行有什么建议吗?
tr {
position: relative;
}
tr::after {
position: absolute;
right: 0;
bottom: 0;
left: 0;
margin: 0 5px;
border-bottom: 1px solid black;
content: "";
}
<table>
<tbody>
<tr>
<td>1-1 cell</td>
<td>1-2 cell</td>
</tr>
<tr>
<td>2-1 cell</td>
<td>2-2 cell</td>
</tr>
<tr>
<td>3-1 cell</td>
<td>3-2 cell</td>
</tr>
</tbody>
</table>
铬
Safari
【问题讨论】:
标签: html css safari css-selectors pseudo-element