我想删除选择框和删除按钮之间的空格。 这是代码:
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<div>
<span>Commande :</span>
<ui-select name="niveau" title="Choose a person" ng-model="dashboard.commande" theme="select2" style="min-width: 300px;">
<ui-select-match placeholder="Choisir un message...">
{{$select.selected.name}}
</ui-select-match>
<ui-select-choices repeat="item in people | filter: $select.search">
<span ng-bind-html="item.id | highlight: $select.search" class="hide"></span>
<small ng-bind-html="item.name | highlight: $select.search"></small>
</ui-select-choices>
</ui-select>
<span>
<button title="sup" ng-click="dashboard.commande = undefined" class="btn btn-default">
<span class="glyphicon glyphicon-trash"></span>
</button>
</span>
</div>
&#13;
图像: image link
答案 0 :(得分:0)
看来你似乎不知道或无法访问css ..
更改此
<button onclick="location.href='page.html'">button</button>
到此
<button title="sup" ng-click="dashboard.commande = undefined" class="btn btn-default">
答案 1 :(得分:0)
您应该使用input-group
课程,并将您的按钮放在span
的课程input-group-btn
内。
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
<div class="input-group">
<input type="text" class="form-control" placeholder="Search for...">
<span class="input-group-btn">
<button class="btn btn-default" type="button"><span class="glyphicon glyphicon-trash"></span></button>
</span>
</div><!-- /input-group -->