关于文本格式化的问题

snail4up 2004-11-09 03:32:12
用TABLE来限定文字,可以实现自动换行,但又没有缩进和回车。用PRE标签,又没有自动换行。如何才能保证这两点呢?
...全文
101 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
JK_10000 2004-11-09
  • 打赏
  • 举报
回复


<head>
<style>
.textareaWidthoutBorder
{
height : expression(this.scrollHeight);
border : 0;
background-color : transparent;
overflow : auto;
}

</style>

</head>

<body bgcolor=efefef>
<table bgcolor=ccccc width=300 >
<tr>
<td>
<textarea class=textareaWidthoutBorder style="width:100%" readOnly >将内容忠实显示
与Pre的区别是内容过多,则会自动折行
fdsafdas
fdsaf
折行折行折行折行折行折行折行折行折行折行折行折行折行折行折行折行折行折行折行折行折行折行
fdsa</textarea>

</td>
</tr>
</table>

</body>
alern_zyb 2004-11-09
  • 打赏
  • 举报
回复
textarea

87,997

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧