摘要:
单行文本换行 效果:强制文本单行显示,超出部分显示省略号 核心属性: white-space: nowrap + overflow: hidden + text-overflow: ellipsis 代码示例 .text-nowrap { width: 200px; white-space: 阅读全文
posted @ 2026-05-07 08:06
nneeyy
阅读(5)
评论(0)
推荐(0)
摘要:
单行文本垂直居中(行高法) 适用场景:固定高度、单行文本 核心原理: line-height 值 = 容器 height 值 代码示例 .box-line { width: 300px; height: 80px; line-height: 80px; /* 核心:行高 = 容器高度 / bo 阅读全文
posted @ 2026-05-07 08:05
nneeyy
阅读(4)
评论(0)
推荐(0)
浙公网安备 33010602011771号