For single-line text, we set the vertical center, you can use the height of line-height to be consistent with the height of the height.
Examples:
.center {
line-height: 200px;
height: 200px;
border: 3px solid green;
text-align: center;
}
/* 如果文本有多行,添加以下代码: */
.center p {
line-height: 1.5;
display: inline-block;
vertical-align: middle;
}