水平滚动的 HTML 表格(第一列固定) [英] HTML table with horizontal scrolling (first column fixed)

查看:80
本文介绍了水平滚动的 HTML 表格(第一列固定)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在想办法制作一个具有固定第一列的表格(以及表格的其余部分具有水平溢出)我看到了一个有类似问题的帖子.但固定列位似乎没有解决.有帮助吗?

解决方案

我有一个类似的表格,样式如下:

<tr><td style="width: 150px">你好,世界!</td><td><div><pre style="margin:0; overflow:scroll">我的预格式化内容</pre>

</td></tr>

I have been trying to think of a way to make a table with a fixed first column (and the rest of the table with a horizontal overflow) I saw a post which had a similar question. but the fixed column bit did not seem to be resolved. Help?

解决方案

I have a similar table styled like so:

<table style="width:100%; table-layout:fixed">
    <tr>
        <td style="width: 150px">Hello, World!</td>
        <td>
            <div>
                <pre style="margin:0; overflow:scroll">My preformatted content</pre>
            </div>
        </td>
    </tr>
</table>

这篇关于水平滚动的 HTML 表格(第一列固定)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆