案例:CSS案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<html>
2
<head>
3
<style type="text/css">
4
p {white-space: pre-wrap;}
5
</style>
6
</head>
7
8
<body>
9
10
<p>This     paragraph has    a  great    many  s p a c e s   with
11
its textual  content, but their    preservation     will  not prevent
12
line   wrapping or line breaking.</p>
13
14
<p>注释:当 white-space 属性设置为 pre-wrap 时,浏览器不仅会保留空白符并保留换行符,还允许自动换行。</p>
15
16
</body>
17
18
</html>
19