javascript 使td内容不换行不撑开
时间:2021-04-23 09:27:08|栏目:JavaScript代码|点击: 次
复制代码 代码如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<style type="text/css">
table {width:200px;table-layout:fixed;}
td {white-space:nowrap;overflow:hidden;word-break:keep-all;}
</style>
<table border="1">
<tr>
<td style="width:50px;">测试测试测试测试测试测试测试测试测试测试</td>
<td>测试测试测试测试测试测试测试测试测试测试测试测试</td>
</tr>
<tr>
<td>测试测试测试测试测试测试测试测试测试测试测试</td>
<td>测试测试测试测试测试测试测试测试测试测试测试</td>
</tr>
</table>
</body>
</html>
上一篇:Bootstrap3 input输入框插入glyphicon图标的方法
栏 目:JavaScript代码
本文地址:http://www.codeinn.net/misctech/106846.html






