html - 表格单元格中的溢出文本

标签 html css

是否可以使表格单元格中的文本溢出?

像这样:

+TABLE-----------------------------------+
| +cell1-----+ +cell2-----+ +cell3-----+ |
| |          | |          | |          | |
| |          | |Example text overflow  | |
| |          | |          | |          | |
| |          | |          | |          | |
| +----------+ +----------+ +----------+ |
+----------------------------------------+

我尝试了 overflow:visiblewhite-space:nowrap 但没有用。

最佳答案

你可以溢出 td 之外的文本,但你需要像这样插入一个 div 标签

<td><div>your text goes here</div></td>

查看此 demo

关于html - 表格单元格中的溢出文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18248523/

相关文章:

javascript - IE7 Javascript 无法正常工作

css - 在 iframe 顶部强制固定导航栏?

jquery - 替换 Squarespace commerce 上的文本字符串

javascript - 在 UI5 中将 AnalyticMap 模型与 OData 服务绑定(bind)

html - 在保持宽高比的同时将标题定位在图像边框内

ios - 哪个浏览器的引擎与 iPad WebKit 最相似? (SVG,CSS)

css - 我应该使用多少个媒体查询?在什么宽度?

jquery - float DIV的对齐问题

html - CSS flex 盒 : Center container with left-justified elements

html - 无法通过 NSAttributedString 使 <img> 适合 UITextView/HTML 中的屏幕宽度