我在display: table div内有display: table-cell div。有什么办法来限制身高吗?我试过设置高度,最大高度和溢出:隐藏,但它没有效果。 (height不设置最低高度,但其他人似乎什么也不做。在/gajaka/1/editCSS“table-cell”样式元素:最大高度(和溢出:隐藏)
This should be maximum 100px. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
CSS
.table {
display: table;
background: green;
width: 100px;
height: 100px;
max-height: 100px; /* ignored */
overflow: hidden; /* ignored */
}
.cell {
display: table-cell;
vertical-align: middle;
max-height: 100px; /* ignored */
text-align: center; /* doesn't work */
}
-10-08
mahemoff
+0
'表cell' =>让元件表现得像一个''元件 –
-10-08 17:08:49