CSS |字间距属性
增加或减少单词之间的空白是 CSS 属性。该属性只能有两个值,即正常值和长度值。 语法:
word-spacing: normal|length|initial|inherit;
属性值:
-
Normal: It defines normal space between words which is 0.25em. This is default value. Example:
```html <!DOCTYPE html>
CSS | word-spacing PropertyThe word-spacing Property
word-spacing: normal:
This is some text. This is some text.
```
输出:
-
Length: It defines an additional space between words (in px, pt, cm, em, etc). Negative values are also allowed. Example:
```html <!DOCTYPE html>
CSS | word-spacing PropertyThe word-spacing Property
word-spacing: length is 20px
GeeksforGeeks - A Computer Science Portal For Geeks!
```
输出:
示例:长度为负值
```html <!DOCTYPE html>
CSS | word-spacing PropertyThe word-spacing Property
word-spacing: length is -20px
GeeksforGeeks - A Computer Science Portal For Geeks!
```
输出:
支持的浏览器:字距属性支持的浏览器如下:
- 谷歌 Chrome 1.0
- Internet Explorer 6.0
- Firefox 1.0
- 歌剧 3.5
- Safari 1.0
版权属于:月萌API www.moonapi.com,转载请注明出处