这是示例http://jsfiddle.net/DvxPc/1/
body { font:16px Calibri;}
table { border-collapse:separate; border-top: 3px solid grey; }
td {
margin:0;
border:3px solid grey;
border-top-width:0px;
white-space:nowrap;
}
div {
width: auto;
overflow-x:scroll;
margin-right:5em;
overflow-y:visible;
padding-bottom:1px;
}
.headcol {
position:absolute;
width:5em;
right:0;
top:auto;
border-right: 0px none black;
border-top-width:3px; /*only relevant for first row*/
margin-top:-3px; /*compensate for top border*/
}
.long { background:yellow; letter-spacing:1em; }
<div><table>
<tr><td class="headcol">X</td><td class="long">QWERTYUIOPASDFGHJKLZXCVBNM</td><td class="long">QWERTYUIOPASDFGHJKLZXCVBNM</td> <td>llaldlfasd<br/>fasdf</td> </tr>
</table></div>
问题是右列不位于行的中心。我将能够在右侧放置删除按钮,如果它没有在中心对齐,那么 UI 会看起来很邋遢。