更新时间:2022-05-10 09:13:30
请记住, vertical-align:middle;
本身并没有用,您还需要设置line-height: line-height:400px;
.
Remember that vertical-align: middle;
is not to useful on its own, you also need to set the line-height: line-height:400px;
.
如果您的< div>
中没有其他文本(可能只有一行),这将很有用.
This is useful if you have no other text in your <div>
(except maybe a single line).