How to control line height in

styled as inline

前端 未结 1 1111
醉话见心
醉话见心 2021-01-17 18:10

Hopefully this is pretty straight forward, just can\'t work it out.

I need to style a paragraph as \'inline\' but i also need to make the line spacing of the para ve

相关标签:
1条回答
  • 2021-01-17 18:32

    On inline elements, the line-height CSS property specifies the height that is used in the calculation of the line box height. On block level elements, line-height specifies the minimal height of line boxes within the element.

    https://developer.mozilla.org/en/CSS/line-height

    what you can do:

    • set line-height: 0px; on the wrapping <div> element
    • set display: inline-block; on the inner <p>
    • float the inner <p>
    0 讨论(0)
提交回复
热议问题