Forgot password
 Register account
View 1368|Reply 0

HTML 制表位

[Copy link]

3175

Threads

7936

Posts

48

Reputation

Show all posts

hbghlyj posted 2021-2-18 23:13 |Read mode
Last edited by hbghlyj 2022-7-27 04:33How 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.

Quick Reply

Advanced Mode
B Color Image Link Quote Code Smilies
You have to log in before you can reply Login | Register account

$\LaTeX$ formula tutorial

Mobile version

2025-7-2 11:25 GMT+8

Powered by Discuz!

Processed in 0.013915 seconds, 23 queries