我有一个看起来像这样的HTML表:
-------------------------------------------------
|Column 1 |Column 2 |
-------------------------------------------------
|this is the text in column |this is the column |
|one which wraps |two test |
-------------------------------------------------
但是我希望它隐藏溢出。这里的原因是文本包含指向更多详细信息的链接,并且使用“包装”会浪费我的布局中的大量空间。它应该是这样的(不增加列或表的宽度,因为它们会离开屏幕/否则会创建水平滚动条):
-------------------------------------------------
|Column 1 |Column 2 |
-------------------------------------------------
|this is the text in column |this is the column |
-------------------------------------------------
我已经尝试了许多不同的CSS技术来尝试实现此目的,但是我无法正确实现。Mootables是我发现的唯一可以做到这一点的东西:http ://joomlicious.com/mootable/ ,但我不知道他们是如何做到的。有谁知道我如何使用CSS和/或Javascript对自己的表执行此操作,或者Mootables如何执行此操作?
HTML示例:
<html><body>
<table width="300px">
<tr>
<td>Column 1</td><td>Column 2</td>
</tr>
<tr>
<td>this is the text in column one which wraps</td>
<td>this is the column two test</td>
</tr>
</table></body></html>