解决图片和文字水平方向居中对齐
<div class="logo-wrapper"> <img class="logo" src="./img/logo.png" alt="logo"> <span class="title">系统登录</span> </div> <style> .logo-wrapper { text-align: center; } .logo { width: 35px; vertical-align:middle; } .title { font-size: 20px; vertical-align:middle; } </style>