dataTables单元格中的自动换行 [英] dataTables automatic linebreak in cell

查看:662
本文介绍了dataTables单元格中的自动换行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有dataTables-table的boostrap模式.我遇到的一个问题是,内容没有空格或换行符的单元格会增加表格在模态之外的宽度.

I have a boostrap modal with a dataTables-table in it. I have a issue where cells with content with no spaces or linebreaks increases the width of the tables outside of the modal.

我该如何解决?见下图

推荐答案

尝试将以下CSS应用于单元格:

Try applying the following css to the cell:

word-break:break-all;

检查 JSFIDDLE

如果这对您不起作用,请尝试使用

If that doesn't work for you ... try working with white-space

white-space: normal;

这篇关于dataTables单元格中的自动换行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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