CSS: reducing line spacing of text?

后端 未结 3 1829
无人及你
无人及你 2020-12-18 17:55

I am having difficulty reducing the spacing between lines of text with CSS line-height (or height - I\'ve tried both).

I have a small bit of text and the spacing is

3条回答
  •  别那么骄傲
    2020-12-18 18:47

    Inline elements don't honour properties such as line-height; they take on the line height of the nearest block parent.

    See Fiddle

    Solution: remove the line-height from the body, or turn the span into a block (i.e. make it a div; don't give display:block to the span).

提交回复
热议问题