我正在尋找表格中的文本溢出,其中th
標記中的文本被轉換90度。在90度旋轉表標題上的CSS3文本溢出
如果文字太長,應該用text-overflow: ellipsis
來剪切文本。這裏有一個例子我的表是什麼樣子:
.positionFix {
height: 25px;
padding: 75px 0 15px 0;
overflow: hidden;
vertical-align: bottom;
white-space: nowrap;
}
.rotate {
overflow: visible;
-webkit-transform: rotate(-90deg);
-moz-transform: rotate(-90deg);
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
-ms-transform: rotate(-90deg);
}
<table border="1">
<tr>
<th class="positionFix">
<div class="rotate" style="width:30px;">item 1</div>
</th>
<th class="positionFix">
<div class="rotate" style="width:30px;">item 2 more text</div>
</th>
<th class="positionFix">
<div class="rotate" style="width:30px;">item 3</div>
</th>
</tr>
<tr>
<td>entry 1</td>
<td>entry 2</td>
<td>entry 3</td>
</tr>
</table>
的問題是,文本溢出確定從單元格的寬度,但在我的案件的字符串的長度它一定是高度。有誰知道這個問題的解決方法?
只是一個dd一個額外的包裝。 – Qwertiy