我有什么
<form class="input-group-1 well" id="spinner-form">
<input id="input1" class="form-control" type="text">
<a class="btn" id="up-button">
<span class="glyphicon glyphicon-chevron-up"></span>
</span>
<a class="btn" id="down-button">
<span class="glyphicon glyphicon-chevron-down" ></span>
</a>
</form>
它看起来像什么:
我想要的是什么:
我使用bootstrap,这里有一些覆盖的样式
<style>
.input-group-1 {
width: 300px;
margin-bottom: 50px;
}
a {
color: #737577;
}
</style>
我不确定如何编辑css来获取此信息,请帮助!!
由于
答案 0 :(得分:3)
像这样:
这是相关的CSS / HTML
<强> HTML 强>
<div class="input-stack">
<input id="input1" class="form-control" type="text" />
<a class="btn" id="up-button">
<span class="glyphicon glyphicon-chevron-up">^</span>
<a class="btn" id="down-button">
<span class="glyphicon glyphicon-chevron-down">v</span>
</a>
</div>
<强> CSS 强>
.input-stack {
display: inline-block;
position: relative;
}
.input-stack input {
padding: 4px;
height: 22px;
line-height: 22px;
font-size: 16px;
border: solid 1px #999;
border-radius: 2px;
}
a.btn {
position: absolute;
right: 5px;
z-index: 2;
}
#up-button {
top: 2px;
}
#down-button {
bottom: 2px;
}