解决图片和文字水平方向居中对齐

<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>

 

posted @ 2019-09-12 14:42  寒爵  阅读(3851)  评论(0编辑  收藏  举报