表格宽度对于页面来说太宽 - jQuery?
我有一个 HTML 表格,在一行中显示很多列 (~25),并且该表格超出了页面的大小并导致滚动条。这是预期但不受欢迎的行为。
我正在寻找一种方法来缩小每列的内容,并在需要时将列拉伸得更大。
所以目前我表中的一行看起来像这样:
information1 |信息2 |信息3 |信息4 | information5
所需的功能将是这样的:
infor... | information5信息... |信息... |信息... |信息...
每一列都可以拉伸或悬停在上面等...以查看完整内容。我见过一些 jQuery 插件,如 zentable 和 ingrid,它们允许调整列大小,但不允许串联,据我所知,可以在没有滚动条的情况下适应父元素中表格的所有内容。
I have an HTML table displaying a lot of columns in a single row (~25) and the table is stretching way beyond the size of the page and causing scrollbars. This is expected but undesirable behaviour.
I am looking for a way to shrink the content of each column with a way of stretching the columns larger if needed.
So currently a row in my table would look something like this:
information1 | information2 | information3 | information4 | information5
Desired functionality would be something like this:
infor... | infor... | infor... | infor... | infor...
With each of those columns the ability to be stretched out or hovered over etc... to see the full content. I have seen a few jQuery plugins like zentable and ingrid which allow the column resizing but not the concatenation as far as I know to fit all the content of the table in the parent element without scrollbars.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您在寻找省略号吗?这就是文本被截断并后面加点的时候……
如果文本溢出容器,请添加省略号:
这个人提供了更多相关细节。
Are you looking for ellipsis? That's when the text is truncated and followed by dots......
Add ellipsis if the text overflows the container:
This fellow provides more detail about it.