“Pr text letter spacing”的版本间差异
本页内容
(创建页面,内容为“{{DISPLAYTITLE:letter-spacing}}3 = CSS letter-spacing 属性 = 设置为h1和h2元素的字母间距: <sample title="" desc="" lang="html" hererun="1"> h1 {letter-spacing:2px} h2 {letter-spacing:-3px} </sample> <run name=""> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>小白教程(xiaobai.wang)</title> <style> h1 {letter-spacing:2px;} h2 {letter-spacing:-3px;} </style> </head> <body> <h1>This is heading 1</…”) |
无编辑摘要 |
||
第51行: | 第51行: | ||
{| class="table table-striped table-hover" | {| class="table table-striped table-hover" | ||
! 属性 | ! 属性 | ||
! | ! Chrome | ||
! | ! Internet Explorer / Edge | ||
! | ! Firefox | ||
! | ! Safari | ||
! | ! Opera | ||
|- | |- | ||
| letter-spacing | | letter-spacing |
2022年8月19日 (五) 04:29的版本
CSS letter-spacing 属性
设置为h1和h2元素的字母间距:
示例
h1 {letter-spacing:2px}
h2 {letter-spacing:-3px}
属性定义及使用说明
letter-spacing 属性增加或减少字符间的空白(字符间距)
默认值: | normal |
继承: | yes |
版本: | CSS1 |
JavaScript 语法: | object.style.letterSpacing="3px" |
浏览器支持
表格中的数字表示支持该属性的第一个浏览器版本号。
属性 | Chrome | Internet Explorer / Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
letter-spacing | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
属性值
值 | 描述 |
---|---|
normal | 默认。规定字符间没有额外的空间。 |
length | 定义字符间的固定空间(允许使用负值)。 |
inherit | 规定应该从父元素继承 letter-spacing 属性的值。 |
相关文章
CSS 教程: CSS Text