<分区>
<分区>
我正在尝试使图像在右侧垂直对齐。
.header {
background-color:white;
width:auto;
height:120px;
}
.title {
vertical-align:center-right;
}
<div class="header">
<div class="title">
<a href="home.html"><img src="logo.png"/></a>
</div><!--TITEL DIV-->
</div><!--HEADER DIV-->
但是“标题”div 中的内容不会在右中心垂直对齐。
最佳答案
.title{
vertical-align: middle;
text-align: right;
}
关于html - 是否垂直对齐 :center-right; works?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42556869/