span(行级元素)在不定高的div(块级元素)中垂直居中的方法 <div> <span>居中</span> </div> 设置父级元素: div{ align-items: center; display: flex; }