怎样使td中的文本正好适应td的大小? 用这个css试一下td,table,tr { word-wrap: break-word; table-layout:fixed;} 这样之后,表格就不会被撑开了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <table width="580"><tr align="left"> <td height="20" width="28" align="center">aa</td><td height="20" width="78" align="center">bb</td><td height="20" width="58" align="center">cc</td><td height="20" width="248"align="left">ddddddddddddddd</td><td height="20" width="78" align="center">ee</td></tr></table>最后一列需要隐藏。我试过隐藏后设置第3列的宽度为248+78,不行。 <table width=300 border=1> <tr> <td>00000</td> <td>11111</td> <td>222222222222</td> <td style="word-break: break-all;">33333333333</td> <td onclick="this.style.display='none';">44</td> </tr></table> <STYLE> .vis1 { visibility:visible } .vis2 { visibility:hidden }</STYLE><table width="580"><tr align="left"> <td height="20" width="28" align="center">aa</td><td height="20" width="78" align="center">bb</td><td height="20" width="58" align="center">cc</td><td height="20" width="248"align="left">ddddddddddddddd</td><td onclick="this.className='vis2';">ee</td></tr></table> <STYLE> .vis1 { visibility:visible } .vis2 { visibility:hidden }</STYLE><table width="580"><tr align="left"> <td height="20" width="28" align="center">aa</td><td height="20" width="78" align="center">bb</td><td height="20" width="58" align="center">cc</td><td height="20" width="58" align="left" style="word-break: break-all;">dddddddddddddddeeeeeee</td><td height="20" width="58" onclick="this.className='vis2';">ee</td></tr></table> 使用如下方式即可。<table width="580"><tr align="left"> <td height="20" width="28" align="center" nowrap>aa</td><td height="20" width="78" align="center" nowrap>bb</td><td height="20" width="58" align="center" nowrap>cc</td><td height="20" width="100%"align="left">ddddddddddddddd</td><td height="20" width="78" align="center" nowrap>ee</td></tr></table> js混淆 关于使用js为Dom动态添加事件的讨论 把字符串转换成数字我们有些可以有些不对? 如何使一些文字,点击后输入到指定的需要提交的文本框里, 怎样在网页中打开Word文档? 急死了,大家帮我看看如何实现啊??? jquery $(document).ready(function() 疑问 怎样使光标变成自定义光标 哪个函数可以将一个字符串中的一段一起转换? 35岁还能学IT么?本人想转行 求将已打开的页面全屏化代码:50分啊 怎样判断子窗口已经打开?
<tr align="left">
<td height="20" width="28" align="center">aa</td>
<td height="20" width="78" align="center">bb</td>
<td height="20" width="58" align="center">cc</td>
<td height="20" width="248"align="left">ddddddddddddddd</td>
<td height="20" width="78" align="center">ee</td>
</tr>
</table>
最后一列需要隐藏。
我试过隐藏后设置第3列的宽度为248+78,不行。
<tr>
<td>00000</td>
<td>11111</td>
<td>222222222222</td>
<td style="word-break: break-all;">33333333333</td>
<td onclick="this.style.display='none';">44</td>
</tr>
</table>
.vis1 { visibility:visible }
.vis2 { visibility:hidden }
</STYLE>
<table width="580">
<tr align="left">
<td height="20" width="28" align="center">aa</td>
<td height="20" width="78" align="center">bb</td>
<td height="20" width="58" align="center">cc</td>
<td height="20" width="248"align="left">ddddddddddddddd</td>
<td onclick="this.className='vis2';">ee</td>
</tr>
</table>
.vis1 { visibility:visible }
.vis2 { visibility:hidden }
</STYLE>
<table width="580">
<tr align="left">
<td height="20" width="28" align="center">aa</td>
<td height="20" width="78" align="center">bb</td>
<td height="20" width="58" align="center">cc</td>
<td height="20" width="58" align="left" style="word-break: break-all;">dddddddddddddddeeeeeee</td>
<td height="20" width="58" onclick="this.className='vis2';">ee</td>
</tr>
</table>
<table width="580">
<tr align="left">
<td height="20" width="28" align="center" nowrap>aa</td>
<td height="20" width="78" align="center" nowrap>bb</td>
<td height="20" width="58" align="center" nowrap>cc</td>
<td height="20" width="100%"align="left">ddddddddddddddd</td>
<td height="20" width="78" align="center" nowrap>ee</td>
</tr>
</table>