zoukankan      html  css  js  c++  java
  • 固定表格布局,固定列的宽度,溢出字隐藏

    一、

    <html>
    <head>
    <style type="text/css">
    table.two
    {
    table-layout: fixed
    }
    </style>
    </head>
    <body>
    <table class="two" border="1" width="100%">
    <tr>
    <td width="20%">1000000000000000000000000000</td>
    <td width="40%">10000000</td>
    <td width="40%">100</td>
    </tr>
    </table>
    </body>
    </html>

    效果:

    二、

    <html>
    <head>
    <style type="text/css">
    table.two
    {
    table-layout: fixed
    }
    td{overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}
    </style>
    </head>
    <body>
    <table class="two" border="1" width="100%">
    <tr>
    <td width="20%">1000000000000000000000000000</td>
    <td width="40%">10000000</td>
    <td width="40%">100</td>
    </tr>
    </table>

    </body>
    </html>

    效果:

  • 相关阅读:
    JAVA 动态代理
    IDEA 配置阿里云Maven
    JAVA Spring5静态代理
    Spring5 常用注解
    react
    Angular
    微信小程序
    H5
    vue-ui
    jQuery
  • 原文地址:https://www.cnblogs.com/ishuanghe/p/5213850.html
Copyright © 2011-2022 走看看