设置 <h1>、<h2> 和 <h3> 元素的字母间距:
h1 {
letter-spacing: 3px;
}
h2 {
letter-spacing: 2px;
}
h3 {
letter-spacing: -1px;
}
亲自试一试 »
这个letter-spacing
属性增加或减少文本中字符之间的间距。
表中的数字指定完全支持该属性的第一个浏览器版本。
Property | |||||
---|---|---|---|---|---|
letter-spacing | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
letter-spacing: normal|
length|initial|inherit;
Value | Description | Demo |
---|---|---|
normal | Defines normal space between characters. This is default | Demo ❯ |
length | Defines a length that is used as the space between characters (negative values are also allowed). Read about length units | Demo ❯ |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
CSS教程:CSS 文本间距
HTML DOM 参考:letterSpacing 属性
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!