私はInteger Number Fieldを開発しようとしています。私はそれが働いているが、スタイリングは多少問題を作り出している。私はGlyphicons PlusとMinusを使ってインクリメントとデクリメントの機能を行い、テキストフィールドを入力してInteger番号を表示しています。Divのボタンとテキストフィールドの調整
divの高さにマイナスグリフィコンを調整できません。 作業コード:http://jsfiddle.net/nvarun123/fv4jxo4t/26/
HTMLコード:
<div>
<a>
<button (click)="decrement()" class="btn btn-primary">
<span><i class="glyphicon glyphicon-minus" ></i></span>
</button>
</a>
<input type="text" style="width:45%;" [(ngModel)]="count">
<a>
<button (click)="increment()" class="btn btn-primary" style="float: right;">
<span><i class="glyphicon glyphicon-plus" ></i></span>
</button>
</a>
</div>
CSSコード:
div {
position:relative;
border: 1px solid #CACEDB;
width: 162px;
height:38px;
overflow: hidden;
white-space: nowrap;
border-radius:3px;
}
input{
text-align: center;
height:100%;
width:100%;
border:none;
}
input:focus{
outline: none;
}
button
{
-webkit-appearance: none;
outline: none;
height:100%;
border:none;
vertical-align:middle;
}
button:active {
background-color: #015191;
}
http://jsfiddle.net/fv4jxo4t/27/私がしたことは、高さ:38pxを 'div'で削除して、今は同じ高さです。 – aahhaa