Home  >  Article  >  Web Front-end  >  Font vertical centering in css_html/css_WEB-ITnose

Font vertical centering in css_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:22:391371browse

defined in css:

body{                                     
text-align: center;
vertical-align:middle;
font: 16px Arial, Song Dynasty;

}

But the font cannot be vertically centered, why?

Reply to discussion (solution)

But the font cannot be vertically centered, why?

re:

If you don’t give a height, how can it be vertically centered? Like I asked you to calculate the sum of n-n, do you know what n-n stands for?

Centering a single line of text line-height

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn