通過固定桌面寬度旋轉圖像。在不增加寬度或列的情況下在桌面內旋轉圖像
請看演示。列的寬度應該在30px左右,但不能反射,因爲圖片寬度(旋轉後)會更多。
想擁有一個旋轉的圖像,仍然保持一個小的寬度(旋轉圖像的寬度將融入TD輕鬆,但無法做出這等)
試了幾種方法,無法獲得所需的結果。任何幫助表示讚賞。
代碼
<div class="bs-example">
<table class="table">
<thead>
<tr>
<th>#</th>
<th class="rotate"><image src="http://example.com/NKV2Yt" height="20" /></th>
<th class="rotate"><image src="http://example.com/NKV2Yt" height="20" /></th>
<th class="rotate"><image src="http://example.com/NKV2Yt" height="20" /></th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>M</td>
<td>O</td>
<td>@</td>
</tr>
<tr>
<td>2</td>
<td>J</td>
<td>T</td>
<td>@</td>
</tr>
<tr>
<td>3</td>
<td>L</td>
<td>t</td>
<td>@</td>
</tr>
</tbody>
</table>
</div><!-- /example -->
CSS ==>
th{
height:200px;
width:30px !important;
}
.rotate{
-webkit-transform: rotate(-90deg); /* Chrome, Safari 3.1+ */
-moz-transform: rotate(-90deg); /* Firefox 3.5-15 */
-ms-transform: rotate(-90deg); /* IE 9 */
-o-transform: rotate(-90deg); /* Opera 10.50-12.00 */
transform: rotate(-90deg); /* Firefox 16+, IE 10+, Opera 12.10+ */
}
謝謝,會檢查並通知你。 –