letter-spacing 字间距基本语法letter-spacing: 间距值;常用单位1. px - 像素letter-spacing: 30px;2. em - 字符单位letter-spacing: 0.5em; /* 0.5个字符宽度 */ letter-spacing: 2em; /* 2个字符宽度 */3. normal - 默认值letter-spacing: no...
2026年02月23日
letter-spacing 字间距基本语法letter-spacing: 间距值;常用单位1. px - 像素letter-spacing: 30px;2. em - 字符单位letter-spacing: 0.5em; /* 0.5个字符宽度 */ letter-spacing: 2em; /* 2个字符宽度 */3. normal - 默认值letter-spacing: no...
2026年02月23日
word-spacing 词间距基本语法word-spacing: 间距值;常用单位1. px - 像素word-spacing: 30px;2. em - 字符单位word-spacing: 2em; /* 2个字符宽度 */3. normal - 默认值word-spacing: normal; /* 浏览器默认,通常是0 */4. 负值 - 缩小间距word-spacing: -5...
2026年02月23日
text-align 文本对齐基本语法text-align: 对齐方式;属性值值说明left左对齐(默认)center居中对齐right右对齐justify两端对齐inherit继承父元素示例代码<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&...
2026年02月23日
line-height 行高基本语法line-height: 行高值;常用单位1. px - 像素line-height: 30px;2. 数值(推荐)line-height: 1.5; /* 字体大小的1.5倍 */ line-height: 2; /* 字体大小的2倍 */3. % - 百分比line-height: 150%; /* 字体大小的150% */ line-hei...
2026年02月23日
font 字体复合写法基本语法font: font-style font-weight font-size/line-height font-family;属性顺序必须按照以下顺序(用空格分隔):font-style (可选) - 字体样式font-weight (可选) - 字体粗细font-size (必需) - 字体大小/line-height (可选) - 行高(用 / 分隔)fon...
2026年02月23日