文本自动换行

来源:互联网 发布:java编程的小游戏 编辑:程序博客网 时间:2024/06/11 01:31

一:
<table border="0" width="100%" cellspacing="0" cellpadding="0" style="TABLE-LAYOUT: fixed">
   <tbody>
    <tr>
     <td style="word-wrap:break-word;width:90%;white-Space:pre;">
      <pre>111111111111111111111111111111111111111111111111111111111111111111111111111</pre>
     </td>
    </tr>
   </tbody>
  </table>

 

二:
<style>
.Wrap{

 BORDER: 0;
 OVERFLOW-Y: visible;
 WIDTH: 386px;
 CURSOR: default;
 BACKGROUND-COLOR: transparent;
}
</style>
<textarea readonly=true class="Wrap">
123
12312333333333333333333333333333333333333333333333333333
</textarea>

原创粉丝点击