我有一个表格,假如宽度是50,表格里一行的字超过了表格的宽度,(默认字体自己会自动换行),我不要字体自己换行,让多出表格宽度的字体自动隐藏,表格里有什么属性可以设置啊?
解决方案 »
- 想做一个弹出选择效果,请问一些问题
- Ext3.0在浏览器下显示问题
- Active X能在USB盾上读取/写入数据嗎?
- JQUERY或者是JS的右下角弹窗
- 怎么获取系统的时间包括年月日时分秒!
- EXT 的Treegrid绑定数据失败, n.toUpperCase is not a function ??
- 如何用javascript选中input中的text?就像copy文字之前要选择文字一样?
- ◆2003年9月27日(15:00)12位MVP齐聚CSDN总部!(现场文字直播)◆
- 包含.css的网页,为什么在netsape中报错
- 关于JQuery开发放大镜相册的求助
- 简单的js正则匹配
- 求个JS判断来访IP,而设置跳转页面的代码
<head>
<style>
body{font-size:12px;}
td{font-size:12px;height:20px; padding:3px; }
.aa{width:200px; overflow:hidden; text-overflow:clip;}
.bb{width:200px; overflow:hidden; text-overflow:ellipsis;}
</style>
</head>
<body>
<table width="500" border="0" cellspacing="1" bgcolor="gray">
<tr bgcolor="white">
<td width="200"><div class="aa"><NOBR>超长直接截断超长直接截断超长直接截断超长直接截断超长直接</NOBR></div></td>
<td width="100" nowrap>产品名称</td>
<td width="100" nowrap>价格</td>
<td width="100" nowrap>数量</td>
</tr>
<tr bgcolor="white">
<td width="200"><div class="bb"><NOBR>超长截断并加省略号超长截断并加省略号超长截断并加省</NOBR></div></td>
<td width="100" nowrap>产品名称</td>
<td width="100" nowrap>价格</td>
<td width="100" nowrap>数量</td>
</tr>
</table>
</body>
</html>关键在于:
width:xx; overflow:hidden; text-overflow:ellipsis;和<nobr>