打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
tabel隐藏第一行控制列宽
<!doctypehtml public "-//w3c//dtd xhtml 1.0transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html>
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
        <title>隐藏第一列</title>
        <styletype="text/css">
.table_style {
    
}
.table_styletd {
    font-size: 12px;
    word-break: break-all;
}
.noheightth {
    border-top-width: 1px;
    border-bottom: none;
    border-left: none;
    border-right: none;
    font-size: 0px;
    height: 0px;
    line-height: 0px;
}
.notoptd {
    border-top: none;
}
<!--
内嵌表格若需要去掉,使用该样式 -->.noborder,.noborder th,.noborder td {
    border: none;
}
</style>
    </head>
    <body>
        <div style="width: 400px; text-align:center;">
            <!-- table上加入table_styleclass-->
            <tableborder="1" cellpadding="0" cellspacing="0" style="width: 100%"
                class="table_style">
                <!-- 第一列tr上加入noheightclasstd中需要有 占位。所有单元格宽度全部在此设置。-->
                <tr class="noheight">
                    <th style="width: 150px;">
                         
                    </th>
                    <th style="width: 150px;">
                         
                    </th>
                    <th style="width: 150px;">
                         
                    </th>
                    <th style="width: 150px;">
                         
                    </th>
                    <th style="width: 150px;">
                         
                    </th>
                    <th>
                         
                    </th>
                </tr>
                <!-- 第二列tr上加入notopclass,若需要加其他class样式,可以空格后继续写入classname-->
                <tr class="notop otherstyle">
                    <td>
                        1-1
                    </td>
                    <td colspan="2">
                        1-2
                    </td>
                    <td>
                        1-3
                    </td>
                    <td colspan="2">
                        1-4
                    </td>
                </tr>
                <tr id="tr3">
                    <td>
                        2-1
                    </td>
                    <td>
                        2-2
                    </td>
                    <td>
                        2-3
                    </td>
                    <td>
                        2-4
                    </td>
                    <td>
                        2-5
                    </td>
                    <td>
                        2-6
                    </td>
                </tr>
            </table>
        </div>
    </body>
</html>
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
解决表格设置table
精)解决表格使用样式 table
四个好看的CSS样式表格
前端开发之div实现table表格系列教程一:创建表格
样式表代码
一篇文章带你了解HTML表格及其主要属性介绍
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服