gpt4 book ai didi

css - Firefox 是否支持位置 : relative on table elements?

转载 作者:数据小太阳 更新时间:2023-10-29 09:05:38 25 4
gpt4 key购买 nike

当我尝试使用 position: relative 时/position: absolute<th> 上或 <td>在 Firefox 中它似乎不起作用。

最佳答案

最简单和最合适的方法是将单元格的内容包装在一个 div 中,并添加 position:relative 到那个 div。

例子:

<td>
<div style="position:relative">
This will be positioned normally
<div style="position:absolute; top:5px; left:5px;">
This will be positioned at 5,5 relative to the cell
</div>
</div>
</td>

关于css - Firefox 是否支持位置 : relative on table elements?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5148041/

25 4 0