table中td用CSS截取字符,超出用省略号…

html:

     <table  class="tbPagination">

    <thead>
        <tr></tr>
    </thead>
    <tbody>
        <tr>
            <td>次要</td>
            <td>2014/03/11 20:22:39</td>
            <td>OPEN</td>
            <td>10.1.6.30</td>
            <td>imgsrv1</td>
            <td>Alarm #2 of global parameter 'LOGErrorLvl' triggered on 'LOGMON.PAgentLog_AlarmPN0'.  3 <= 3.00 <= 3</td>
        </tr>
        <tr></tr>
        <tr></tr>
        <tr></tr>
        <tr></tr>
        <tr></tr>
        <tr></tr>
        <tr></tr>
    </tbody>
    <tfoot></tfoot>

</table>

CSS:

table.tbPagination{width:225px;table-layout:fixed;text-align:center;}

table.tbPagination tbody tr td {border: 1px solid #adaeaf; background:#e7eaef;height: 29px;

                                                 white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}

/* table.tbPagination tbody tr td:hover{text-overflow:inherit;overflow:visible;white-space:pre-wrap} */ /* 显示隐藏文字 white-space:pre-wrap 正常换行*/




版权声明:本文为u012531787原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
THE END
< <上一篇
下一篇>>