On Macintosh, line-height equals height,. Text is not centered.

such as the question, it was recently found that the line height of the css style setting on the Apple computer is equal to the height, and the text is not centered, but on the upper side

.
height: 36px;
line-height: 36px;
text-align: center;

after I use the flex layout, I also can"t center the text vertically

    display: flex;
    justify-content: center;
    align-items: center;

the same code is normal on window. The text is centered vertically, but under mac, it is slightly higher

.
Apr.17,2021

is not clear what element you are using, you try to add a padding:0px , and then look at it.


should be a font or padding

Menu