课堂随笔3
一、基础文本样式
字体
font-family :字体族,优先顺序
font-size :字号(px / rem / em / vw)
font-weight :字重(100–900,normal / bold)
font-style :斜体 italic / normal
行高
line-height :行间距,纯数字最佳(如 1.5 )
颜色
color :文字颜色
opacity :整体透明度
二、段落与对齐
text-align :left / right / center / justify
text-indent :首行缩进
letter-spacing :字间距
word-spacing :词间距(英文)
white-space :换行与空格处理
nowrap 不换行
pre 保留空格换行
pre-wrap 自动换行+保留格式
三、文本装饰与修饰
text-decoration :underline / line-through / none
text-transform :大小写转换
uppercase / lowercase / capitalize
text-shadow :文字阴影
图片常见格式
JPG:照片,体积小
PNG:透明背景,图标
GIF:动图
WebP:现代格式,体积更小,加载更快
SVG:矢量图,放大不失真,适合图标

浙公网安备 33010602011771号