簡體   English   中英

當引導程序中的屏幕尺寸正常時,如何使響應式表格滾動隱藏

[英]how to make responsive table scroll hidden when screen size normal in bootstrap

當表設置為響應時,當屏幕大小正常時,我想讓我的引導表不顯示右向左滾動。 我錯過了這里的任何一步嗎? 我怎樣才能解決這個問題 ?

<div class="table-responsive">              
    <table id="inlist" class="table table-striped table-hover">
        <thead>
            <tr>
                <th>x</th>
                <th>y</th>
                <th>z</th>
            </tr>
        </thead>

        <tbody>
        </tbody>
    </table>
</div>  

這是正常屏幕的圖像

在此處輸入圖片說明

打開一個字板,創建一個新文檔,然后輸入

#inlist{overflow:hidden; word-wrap:normal | break-word; }

將其另存為 (insert name).css 並將其添加到您的 html。 這種方式比在 html 中拼接 a 更容易。 使用 css,您可以控制網頁中所有內容的樣式並保持 html 整潔。

只需添加到 div table-responsive

<style>
    .table-responsive {
        overflow-x: visible; 
    }
</style>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM