HTML
<div class="combobox">
<input type="text" value="" name="brand" class="text" id="brand">
<span class="dropdown_btn"></span>
</div>
CSS
.combobox {
margin: 0;
padding: 0;
vertical-align: middle;
}
.combobox input {
height: 20px;
line-height: 20px;
margin: 0;
padding: 0;
}
.combobox .dropdown_btn {
width: 18px;
height: 20px;
margin-left: -20px;
display: inline-block;
cursor: pointer;
background-color: blue;
}
但结果是这样的:
我不知道差距从何而来;为什么文本输入不像蓝色按钮那样紧贴其容器 div?