我想垂直对齐我的项目中的输入。我的代码适用于跨度,但不适用于输入!什么原因?使用引导程序垂直对齐输入3
CSS代码:
.float {
display: table-cell;
vertical-align: middle;
text-align: center;
}
div {
display: table;
border: solid 1px blue;
height: 120px;
}
HTML代码:
<div class="col-sm-12 ">
<span class='float'>Float right</span>
</div>
<div class="col-sm-12 ">
<input class='float' id='btnReport' name='btnReport' type='button' value='report' />
</div>