找回密码
 快速注册
搜索
查看: 1203|回复: 0

HTML 制表位

[复制链接]

3149

主题

8387

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65397
QQ

显示全部楼层

hbghlyj 发表于 2021-2-18 23:13 |阅读模式
本帖最后由 hbghlyj 于 2022-7-27 04:33 编辑 How to get a tab character
在 Discuz 的浏览帖子页, 制表位会被替换成8个空格. 例如 A[[Tab]]A 的效果是A        A
在 HTML 中, 制表位会显示为1个空格的宽度 (无论是literal tab, 还是html实体 	 都一样).
在 <pre> 或 <textarea> 等标签中, 制表位会被替换为8ch (见注1).
可以用CSS的绝对定位来对齐多行的文本.
position: absolute; left: 8em;



注1
The ch unit, or the character unit is defined as being the “advanced measure” of the width of the zero character, 0 .
In monospace (fixed-width) fonts, where all characters are the same width, 1ch equals one character. In proportional (variable-width) fonts, any given character could be wider or narrower than the “0” character.

手机版|悠闲数学娱乐论坛(第3版)

GMT+8, 2025-3-4 18:30

Powered by Discuz!

× 快速回复 返回顶部 返回列表