怎样使<pre>标记中的一行太长的字符自动换行?

代码如例子

 1<table border="2" width="500">
 2<tr>
 3<td width="300"><pre width="200">   
 4sdfdsfsdfsd   
 5fsdafasfdass   
 6fdsafsdaf   
 71111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111过长的一行   
 8</pre></td>
 9<td>33333333333</td>
10</tr>
11</table>

请指点怎样使得过长的一行在长度达到300时能自动换行?谢谢
---------------------------------------------------------------

1<pre style="width: 300; word-wrap: break-word; table-layout: fixed;">   
2sdfdsfsdfsd   
3fsdafasfdass   
4fdsafsdaf   
51111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111过长的一行   
6</pre>
Published At
Categories with Web编程
Tagged with
comments powered by Disqus