多个< tbody>包装 [英] Wrapper for multiple <tbody>?

查看:133
本文介绍了多个< tbody>包装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于特定的CSS要求,我在表格设计中使用多个< tbody> 标签:

For specific css requirements I'm using multiple <tbody> tags in my table design which looks something like this:

使用多个标签

但我还需要一个 多个tbody标签的包装器 (类似于常见的tbody父标签),这样 wrapper可以滚动 ,以实现以下效果:

But I also require a wrapper for multiple tbody tags (something like a common tbody parent) such that this wrapper can be scrolled in order achieve the following effect:

可滚动的常用文件

如何实现后者的滚动效果前一个?

How do I achieve the latter srolling effect in the former one?

(PS:我知道这可以通过嵌套表的方法,但我正在寻找其他替代品,如果有)

(P.S.: I know this can be done through nested table approach, but I'm looking for other alternatives if any)

推荐答案

正如FelipeAls和其他人所提到的,< tbody> 只有一个< table> 标签,我试着包装< thead> ; tbody> 在单独的表中,以下列方式创建所需效果:

As mentioned in the comments by FelipeAls and others that a <tbody> tag can be wrapped only by a <table> tag, I tried wrapping <thead> and <tbody>s in separate tables to create the desired effect in the following way:

<table>
    <thead>
        ...
    </thead>
</table>

<table>
    <tbody>
        ...
    </tbody>
    <tbody>
        ...
    </tbody>
    <tbody>
        ...
    </tbody>
</table>

这解决了问题。

a 工作演示

Here's a Working Demo.

这篇关于多个&lt; tbody&gt;包装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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