div層給table加滾動條

style="overflow: hidden; width: 100px; white-space: nowrap; text-overflow: ellipsis" //讓全部的table td都展開
 
overflow-y: hidden; overflow-x: scroll; width: 987px  //設置豎着沒有滾動條,橫着有滾動條 ,必定要設置寬度
例子:
<div style="overflow-y: hidden; overflow-x: scroll; width: 987px">
        <table class="report-list" style="width: 970px" cellspacing="0" cellpadding="0" align="center" border="2" bind="on">
            <tbody>
                <tr>
                    <td class="itemClick1" align="center" width="30">
                        序號
                    </td>
                    <td class="itemClick1-5" align="center" width="100" req="SORT,建立日期" con="CLICK">
                        建立日期
                    </td>
                    <td class="itemClick1-5" align="center" width="100" req="SORT,質量問題名稱" con="CLICK">
                        質量問題名稱
                    </td>
                    <td class="itemClick1-5" align="center" width="100" req="SORT,最終產品名稱" con="CLICK">
                        最終產品名稱
                    </td>
                    <td class="itemClick1-5" align="center" width="100" req="SORT,工做狀態" con="CLICK">
                        工做狀態
                    </td>
                    <td class="itemClick1-5" align="center" width="100" req="SORT,一層緣由" con="CLICK">
                        一層緣由
                    </td>
                    <td class="itemClick1-5" align="center" width="100" req="SORT,技術歸零" con="CLICK">
                        技術歸零
                    </td>
                    <td class="itemClick1-5" align="center" width="100" req="SORT,管理歸零" con="CLICK">
                        管理歸零
                    </td>
                    <td class="itemClick1-5" align="center" width="40" req="SORT,原件查看" con="CLICK">
                        原件查看
                    </td>
                    <td class="itemClick1-5" style="width: 40px; text-align: center">
                        <div style="overflow: hidden; width: 40px; white-space: nowrap; text-overflow: ellipsis">
                            刪除</div>
                    </td>
                    <td class="itemClick1-5" style="width: 40px; text-align: center">
                        <div style="overflow: hidden; width: 40px; white-space: nowrap; text-overflow: ellipsis">
                            修改</div>
                    </td>
                    <td class="itemClick1-5" style="border-bottom-color: #79d8f0; width: 60px; text-align: center">
                        <div style="overflow: hidden; width: 60px; white-space: nowrap; text-overflow: ellipsis">
                            工做流</div>
                    </td>
                    <td>
                        備註
                    </td>
                    <td>
                        多數
                    </td>
                </tr>
                <tr class="reportTR" req="REPORT,b0cfeedbe63c48a99d3b324acc5bb619,02,a2f004335b1c4a4398706ce32b5aca6f,4,admin,,,," con="CLICK">
                    <td class="item1" align="center">
                        <div class="overflow1" title="1">
                            1</div>
                    </td>
                    <td class="item1-6" align="center" width="100">
                        <div title="2013-01-30 14:05:12" style="overflow: hidden; width: 100px; white-space: nowrap; text-overflow: ellipsis">
                            2013-01-30 14:05:12</div>
                    </td>
                    <td class="item1-6" align="center" width="100">
                        <div title="mclk" style="overflow: hidden; width: 100px; white-space: nowrap; text-overflow: ellipsis">
                            mclk</div>
                    </td>
                    <td class="item1-6" align="center" width="100">
                        <div title="最終產品名稱" style="overflow: hidden; width: 100px; white-space: nowrap; text-overflow: ellipsis">
                            最終產品名稱</div>
                    </td>
                    <td class="item1-6" align="center" width="100">
                        <div title="總裝測試" style="overflow: hidden; width: 100px; white-space: nowrap; text-overflow: ellipsis">
                            總裝測試</div>
                    </td>
                    <td class="item1-6" align="center" width="100">
                        <div title="軟件" style="overflow: hidden; width: 100px; white-space: nowrap; text-overflow: ellipsis">
                            軟件</div>
                    </td>
                    <td class="item1-6" align="center" width="100">
                        <div title="是" style="overflow: hidden; width: 100px; white-space: nowrap; text-overflow: ellipsis">
                            是</div>
                    </td>
                    <td class="item1-6" align="center" width="100">
                        <div title="是" style="overflow: hidden; width: 100px; white-space: nowrap; text-overflow: ellipsis">
                            是</div>
                    </td>
                    <td class="item1-6" align="center" width="40">
                        <div style="overflow: hidden; width: 40px; white-space: nowrap; text-overflow: ellipsis">
                            <div>
                            </div>
                        </div>
                    </td>
                    <td class="item11" style="width: 40px">
                        <div style="overflow: hidden; width: 40px; white-space: nowrap; text-overflow: ellipsis">
                            <img alt="刪除" src=http://www.2cto.com/uploadfile/2013/0312/20130312025239307.png" border="0" req="DEL,b0cfeedbe63c48a99d3b324acc5bb619," con="UPDATE" /></div>
                    </td>
                    <td class="item11" style="width: 40px; text-align: center">
                        <div style="overflow: hidden; width: 40px; white-space: nowrap; text-overflow: ellipsis">
                        </div>
                    </td>
                    <td class="workflow-status workflow-status-4" style="border-bottom-color: #79d8f0; width: 60px; text-align: center">
                        <div style="overflow: hidden; width: 60px; white-space: nowrap; text-overflow: ellipsis">
                            待修改</div>
                    </td>
                    <td>
                        <div style="overflow: hidden; width: 60px; white-space: nowrap; text-overflow: ellipsis">
                            備註數據</div>
                    </td>
                    <td>
                        sdddddddddddddd
                    </td>
                </tr>
                <tr class="reportTR" req="REPORT,cd0c2c1ece774dadbb8e734db874d5e7,02,a2f004335b1c4a4398706ce32b5aca6f,4,admin,,,," con="CLICK">
                    <td class="item1" align="center">
                        <div class="overflow1" title="2">
                            2</div>
                    </td>
                    <td class="item1-6" align="center" width="100">
                        <div title="2013-01-22 12:23:03" style="overflow: hidden; width: 100px; white-space: nowrap; text-overflow: ellipsis">
                            2013-01-22 12:23:03</div>
                    </td>
                    <td class="item1-6" align="center" width="100">
                        <div title="質量問題名稱" style="overflow: hidden; width: 100px; white-space: nowrap; text-overflow: ellipsis">
                            質量問題名稱</div>
                    </td>
                    <td class="item1-6" align="center" width="100">
                        <div title="234234" style="overflow: hidden; width: 100px; white-space: nowrap; text-overflow: ellipsis">
                            234234</div>
                    </td>
                    <td class="item1-6" align="center" width="100">
                        <div title="研製階段" style="overflow: hidden; width: 100px; white-space: nowrap; text-overflow: ellipsis">
                            研製階段</div>
                    </td>
                    <td class="item1-6" align="center" width="100">
                        <div title="器材" style="overflow: hidden; width: 100px; white-space: nowrap; text-overflow: ellipsis">
                            器材</div>
                    </td>
                    <td class="item1-6" align="center" width="100">
                        <div title="是" style="overflow: hidden; width: 100px; white-space: nowrap; text-overflow: ellipsis">
                            是</div>
                    </td>
                    <td class="item1-6" align="center" width="100">
                        <div title="是" style="overflow: hidden; width: 100px; white-space: nowrap; text-overflow: ellipsis">
                            是</div>
                    </td>
                    <td class="item1-6" align="center" width="40">
                        <div style="overflow: hidden; width: 40px; white-space: nowrap; text-overflow: ellipsis">
                            <div>
                            </div>
                        </div>
                    </td>
                    <td class="item11" style="width: 40px">
                        <div style="overflow: hidden; width: 40px; white-space: nowrap; text-overflow: ellipsis">
                            <img alt="刪除" src=http://www.2cto.com/uploadfile/2013/0312/20130312025239307.png" border="0" req="DEL,cd0c2c1ece774dadbb8e734db874d5e7,"  con="UPDATE" /></div>
                    </td>
                    <td class="item11" style="width: 40px; text-align: center">
                        <div style="overflow: hidden; width: 40px; white-space: nowrap; text-overflow: ellipsis">
                        </div>
                    </td>
                    <td class="workflow-status workflow-status-4" style="border-bottom-color: #79d8f0; width: 60px; text-align: center">
                        <div style="overflow: hidden; width: 60px; white-space: nowrap; text-overflow: ellipsis">
                            待修改</div>
                    </td>
                    <td>
                        備註數據
                    </td>
                    <td>
                        sssssdfsdfsdfsdfsdf
                    </td>
                </tr>
                <tr class="reportTR" req="REPORT,7bfd927584094ba48e29010162b76fcb,02,a2f004335b1c4a4398706ce32b5aca6f,4,admin,,,," con="CLICK">
                    <td class="item1" align="center">
                        <div class="overflow1" title="3">
                            3</div>
                    </td>
                    <td class="item1-6" align="center" width="100">
                        <div title="2013-01-14 11:41:38" style="overflow: hidden; width: 100px; white-space: nowrap; text-overflow: ellipsis">
                            2013-01-14 11:41:38</div>
                    </td>
                    <td class="item1-6" align="center" width="100">
                        <div title="問題" style="overflow: hidden; width: 100px; white-space: nowrap; text-overflow: ellipsis">
                            問題</div>
                    </td>
                    <td class="item1-6" align="center" width="100">
                        <div title="名稱" style="overflow: hidden; width: 100px; white-space: nowrap; text-overflow: ellipsis">
                            名稱</div>
                    </td>
                    <td class="item1-6" align="center" width="100">
                        <div title="發射場測試" style="overflow: hidden; width: 100px; white-space: nowrap; text-overflow: ellipsis">
                            發射場測試</div>
                    </td>
                    <td class="item1-6" align="center" width="100">
                        <div title="工藝" style="overflow: hidden; width: 100px; white-space: nowrap; text-overflow: ellipsis">
                            工藝</div>
                    </td>
                    <td class="item1-6" align="center" width="100">
                        <div title="是" style="overflow: hidden; width: 100px; white-space: nowrap; text-overflow: ellipsis">
                            是</div>
                    </td>
                    <td class="item1-6" align="center" width="100">
                        <div title="是" style="overflow: hidden; width: 100px; white-space: nowrap; text-overflow: ellipsis">
                            是</div>
                    </td>
                    <td class="item1-6" align="center" width="40">
                        <div style="overflow: hidden; width: 40px; white-space: nowrap; text-overflow: ellipsis">
                            <div>
                                <a onclick="KeyUpM(1,'VIEW','METE','7bfd927584094ba48e29010162b76fcb')" href="http://localhost:6404/IcelineIar/secure/report/fullQuarterlyList.aspx?TYPE=02#">
                                    <img alt="查看原件" src=http://www.2cto.com/uploadfile/2013/0312/20130312025239327.png" border="0" /></a></div>
                        </div>
                    </td>
                    <td class="item11" style="width: 40px">
                        <div style="overflow: hidden; width: 40px; white-space: nowrap; text-overflow: ellipsis">
                            <img alt="刪除" src=http://www.2cto.com/uploadfile/2013/0312/20130312025239307.png" border="0" req="DEL,7bfd927584094ba48e29010162b76fcb," con="UPDATE" /></div>
                    </td>
                    <td class="item11" style="width: 40px; text-align: center">
                        <div style="overflow: hidden; width: 40px; white-space: nowrap; text-overflow: ellipsis">
                        </div>
                    </td>
                    <td class="workflow-status workflow-status-4" style="border-bottom-color: #79d8f0;
                        width: 60px; text-align: center">
                        <div style="overflow: hidden; width: 60px; white-space: nowrap; text-overflow: ellipsis">
                            待修改</div>
                    </td>
                    <td>
                        備註數據
                    </td > www.2cto.com
                    <td>
                        eeeeeeeeeeeeeeeeeeeeeeeeeeee
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
相關文章
相關標籤/搜索