3
我在表列中有一些文本比我想要的列寬大。所以文本正在從中溢出。所以我應用overflow:auto
,但在這種情況下,它顯示的數據小於列寬度的每個頁面上滾動。表列文本大於列寬?
我不想在該頁面上顯示數據小於列寬度的滾動只是想顯示數據大於其長度的位置。
有沒有人有一些建議?
<td style=" width:50%;overflow:auto;>
我在表列中有一些文本比我想要的列寬大。所以文本正在從中溢出。所以我應用overflow:auto
,但在這種情況下,它顯示的數據小於列寬度的每個頁面上滾動。表列文本大於列寬?
我不想在該頁面上顯示數據小於列寬度的滾動只是想顯示數據大於其長度的位置。
有沒有人有一些建議?
<td style=" width:50%;overflow:auto;>
嘗試包裹TD內容在DIV與固定width
和overflow: auto
例如:
<table>
<tr>
<td>some content</td>
<td> <!-- your fixed width column -->
<div style="width: 100px; overflow: scroll;">
Loremipsumdolorsitametconsectetuadipisicingelit
</div>
</td>
</tr>
</table>
use this <td style=" width:50%;overflow:scroll;">
This will insert horizontal and vertical scrollbars.
They will become active only if the content requires it.
嘗試包裹TD內容與固定的寬度和溢出DIV:自動。 – rogal111
謝謝你很好,謝謝你。 –
我已經添加了答案,請投票。 – rogal111