How to vertically align 2 different sizes of text?

后端 未结 8 661
终归单人心
终归单人心 2020-12-02 13:48

I know to vertically align text to the middle of a block, you set the line-height to the same height of the block.

However, if I have a sentence with a word in the m

8条回答
  •  南笙
    南笙 (楼主)
    2020-12-02 14:26

    You technically can't, however, if you have fixed text sizes you could use positioning (relative) to move the larger text down and set the line-height to the smaller text (I'm presuming this larger text is marked up as such so you can use that as a CSS selector)

提交回复
热议问题