Html 修复了firefox中td resize后第一列表格第一列消失的问题

Html 修复了firefox中td resize后第一列表格第一列消失的问题,html,css,angularjs,firefox,Html,Css,Angularjs,Firefox,我有一个带有固定第一列的表,它允许我在保持第一列的同时左右滚动表列 (整个表都在给我滚动条的包装器中,因为表总是比包装器宽。) 表的标题上还有一个切换按钮,用于显示某些td中的额外数据 当使用Firefox时,将表格向右滚动,然后单击切换按钮,整个第一列将消失……这种情况仅在Firefox中发生。 如何解决这个问题 这是你的电话号码 HTML 您只需添加left:0,以确保元素正确粘贴。宽度的变化导致它移出视野 .da-fixed-column-table tbody tr td:first-c

我有一个带有固定第一列的表,它允许我在保持第一列的同时左右滚动表列

(整个表都在给我滚动条的包装器中,因为表总是比包装器宽。)

表的标题上还有一个切换按钮,用于显示某些td中的额外数据

当使用Firefox时,将表格向右滚动,然后单击切换按钮,整个第一列将消失……这种情况仅在Firefox中发生。 如何解决这个问题

这是你的电话号码

HTML


您只需添加
left:0
,以确保元素正确粘贴。宽度的变化导致它移出视野

.da-fixed-column-table tbody tr td:first-child,
.da-fixed-column-table thead tr th:first-child {
    position: absolute;
    border: none;
    top: auto;
    width: 8em;
    text-align: left;
    background: white;
    left: 0;
}

不幸的是,设置left:0将使屏幕上的第一列向左移动。。。
.da-fixed-column-table-wrapper {
 width: 100%;
 overflow: auto;
 box-sizing: border-box;
 background: DarkKhaki;
}

.da-fixed-column-table {
 width: 120%;
 border-collapse: collapse;
 box-sizing: border-box;
 text-align: right;
}

.da-fixed-column-table tbody tr td:first-child,
.da-fixed-column-table thead tr th:first-child {
  position: absolute;
  border: none;
  top: auto;
  width: 8em;
  text-align: left;
  background: white;
}

.da-fixed-column-table thead tr th:nth-child(2),
.da-fixed-column-table tbody tr td:nth-child(2) {
 padding-left: 9em;
}
.da-fixed-column-table tbody tr td:first-child,
.da-fixed-column-table thead tr th:first-child {
    position: absolute;
    border: none;
    top: auto;
    width: 8em;
    text-align: left;
    background: white;
    left: 0;
}