Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.1k views
in Technique[技术] by (71.8m points)

前端如何解决网页相同位数的数字无法对齐的问题?

image.png

如图所示,设置的右对齐数字

但是因为数字的不同,导致都是四位数,但左边并没有对齐

当然我知道是字体的问题,目前文字并未设置字体(因为是网页的原因也不好引入外部字体),是在mac上浏览的,所以应该默认是苹方

所以要如何解决这个问题呢?

我怕引入外部字体会不兼容


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

你在数字外包一层code标签试试?<code>1234</code>


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...