CSS文本实例:增加单词间距

作者:小胖吴 | 创建时间: 2023-07-12
CSS 代码均位于 HTML 的 head 部分,这样做的目的是为了利于演示例子本身。在实际的开发中,使用 CSS 最好的方式是引用外部样式表。 这里介绍:CSS文本实例:增加单词间距...
CSS文本实例:增加单词间距

步骤/方法

<html> <head> <style type="text/css"> p.spread {word-spacing: 30px;} p.tight {word-spacing: -0.5em;} </style> </head> <body> <p class="spread">This is some text. This is some text.</p> <p class="tight">This is some text. This is some text.</p> </body> </html>

运行结果:

温馨提示

本文仅供参考
点击展开全文

更多推荐