CSS 控制文本不换行 white-space

定义
white-space 。

继承:是

JavaScript的语法
的CSS属性也可以动态改变一个JavaScript 。

脚本语法: object.style.whiteSpace = “ nowrap ”

 p
{
white-space: normal
}

Value Description
normal 正常模式
pre  white-space  行为像<pre>的HTML标记
nowrap The text will never wrap, it continues on the same line until a <br> tag is encountered

<html>
<head>
<style type=”text/css”>
p
{
white-space: nowrap
}
</style>
</head>
<body>

<p>
中国WEB第一站

中国WEB第一站

中国WEB第一站

</p>

结果.

中国WEB第一站 中国WEB第一站 中国WEB第一站

</body>
</html>

CSS 控制文本不换行 white-space

相关文章:

你感兴趣的文章:

标签云: