【发布时间】:2016-07-23 15:53:48
【问题描述】:
这可能是我相当简单的东西,但在我的表格中,我有一个 input 和 type = "password" 和一个 button type = button 并排在一起。在我设法最初排列所有内容后,我决定将两个组件的高度设置为相同的高度
我希望结果是这样的。
当我使用下面的代码时。但是,当您运行下面的代码时,您会看到高度不同。
input[type="password"] {
float: left;
margin: 0px 0px 0px 2vw;
width: 150px;
height: 50px;
display: inline-block;
}
.form-ckbx {
display: inline-block;
width: 150px;
height: 50px;
}
<form>
<input type="password" class="form-inp" id="password" placeholder="Password">
<button type = "button" class = "form-ckbx" id = "check" title="Show Password">Some Text</button>
</form>
我该如何解决这个问题?
【问题讨论】: