当添加大量文本时,我的td / tr正在垂直伸展。无论显示多少文本(如果溢出都可滚动),我都需要该行保持相同的大小
table {
display: inline-block;
table-layout: fixed;
width: 100%;
height: 480px;
overflow-y: scroll;
border-collapse: collapse;
border-top: none;
}
tr {
border-bottom: 1px solid white;
max-height: 40px;
min-height: 40px;
height: 40px;
padding: 5px;
}
td {
white-space: normal;
word-wrap: break-word;
font-size: 12px;
text-align: center;
overflow: none;
-webkit-appearance: none;
overflow-y: none;
max-height: 40px;
min-height: 40px;
overflow-x: scroll
}
答案 0 :(得分:0)
如何添加
td {
white-space: normal;
word-wrap: break-word;
font-size: 12px;
text-align: center;
-webkit-appearance: none;
max-height: 40px;
min-height: 40px;
width: 14.28%;
overflow: auto;
}
到你的CSS。