.center-vertical{
display
:
block
;
position
:
relative
;
top
:
50%
;
transform:translateY(
-50%
);
}
<div>
<span class=
"center-vertical"
>
内容
</span>
</div>