Centering, the difference between height and line-height, define which attribute respectively
刘春阳
刘春阳 2018-10-30 23:02:11
0
2
1408

<h3 style="text-align: center;background: pink;height: 50px;line-height: 50px;">居中</h3>

</body>


刘春阳
刘春阳

reply all(1)
灭绝师太

height is to define the height of the element, and line-height is to define the line height (referring to the distance between text and baseline)

  • reply The line-height effect is centered
    刘春阳 author 2018-10-31 09:26:31
  • reply If line height is not 25px centered
    刘春阳 author 2018-10-31 09:27:12
  • reply It's not centered, but it can achieve the centering effect. Line-height defines the line height.
    灭绝师太 author 2018-10-31 11:14:39
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template