我试过了
<table border="0" cellspacing="0"
cellpadding="0" height="25" width="100%" style='table-layout:fixed' >
和
<table border="0" cellspacing="0"
cellpadding="0" height="25" width="100%" overflow:hidden >
您需要指定两个属性,table-layout:fixed on table 和 white-space:nowrap; 在单元格上。您还需要移动溢出:隐藏;到细胞也。
table {width:100%; table-layout:fixed;}
td {overflow:hidden; white-space:nowrap;}
仅当文本溢出时,才能使用 overflow-x:hidden
水平隐藏文本。类似地overflow-y:hidden
隐藏垂直滚动条。请记住,还要将table-layout
设置为 fixed
,将white-space
设置为 no-wrap