这是我的html表单:
<form novalidate class="simple-form">
<label>Reviews Min: <input type="number" ng-init="revNum=0" class="form-control" min="0" step="10" ng-model="revNum" /></label>
<label>Min Price: <input type="number" ng-init="minNum=0" class="form-control" min="0" step="1000" ng-model="minNum" /></label>
<label>Max Price: <input type="number" ng-init="maxNum=0" class="form-control" min="0" step="1000" ng-model="maxNum" /></label>
<label><button class="btn btn-primary" ng-click="updateNumArray(revNum, minNum, maxNum); updateActiveRow()">Filter</button></label>
</form>
这是我的css
simple-form label{
margin-left: 10px;
}
input {
width: 150px !important;
}
这是chrome中的输出:
在firefox中:
正如您所看到的,我的过滤器按钮高于firefox中的输入字段。
我该如何解决这个问题。
答案 0 :(得分:1)
我认为它与按钮的显示内联块有关。这最终适用于两种浏览器:
<form novalidate class="simple-form">
<label>Reviews Min: <input type="number" ng-init="revNum=0" class="form-control" min="0" step="10" ng-model="revNum" /></label>
<label>Min Price: <input type="number" ng-init="minNum=0" class="form-control" min="0" step="1000" ng-model="minNum" /></label>
<label>Max Price: <input type="number" ng-init="maxNum=0" class="form-control" min="0" step="1000" ng-model="maxNum" /></label>
<label> <button class="btn btn-primary" style="display:block;" ng-click="updateNumArray(revNum, minNum, maxNum); updateActiveRow()">Filter</button></label>
</form>
http://jsfiddle.net/yjpr6pLm/1/
你可以明显地移动显示:阻止内联样式,只是暴露它为什么不适合你。