TD中回车的困惑

来源:互联网 发布:公司取名软件duote 编辑:程序博客网 时间:2024/05/16 06:18

最近弄得几个项目,在页面的编辑时都碰到这个问题。

  1. <html>
  2. <table>
  3. <tr>
  4. <td>
  5. 123
  6. 456
  7. 789
  8. </td>
  9. </tr>
  10. <tr>
  11. <td>123456789</td>
  12. </tr>
  13. </table>
  14. </html>

上面table的两行显示的效果是不一样的,回车(一个和多个)会增加一个&nbsp;

123 456 789
123456789

 

本来html中不是只能通过&nbsp;来添加空格吗,不知道td中为什么把回车给解析成一个空格了

 

原创粉丝点击