我希望所有工具提示都显示在同一位置。具有输入组的那个稍微不对齐。此外,选择(selectpicker)也不会出现工具提示。请帮忙。谢谢。
链接: http: //www.bootply.com/pb5yAV7aIS
$(function() {
$('[data-toggle="tooltip"]').tooltip();
$('.selectpicker').selectpicker();
});
.mb5 { margin-bottom: 5px; }
.tooltip-inner { max-width: 500px; white-space: nowrap; }
.red-tooltip + .tooltip > .tooltip-inner { background-color: #f00; }
.red-tooltip + .tooltip > .tooltip-arrow { border-right-color: #f00; }
<div class="container">
<div class="form-horizontal">
<div class="col-sm-3">
<div class="form-group mb5">
<input type="text" class="form-control input-sm" data-toggle="tooltip" data-placement="right" title="This is input">
</div>
<div class="form-group mb5">
<input type="text" class="form-control input-sm red-tooltip" data-toggle="tooltip" data-placement="right" title="This is another input">
</div>
<div class="form-group mb5">
<div class="input-group input-group-sm">
<input type="text" class="form-control input red-tooltip" data-toggle="tooltip" data-placement="right" title="This is input with group">
<span class="input-group-btn">
<button class="btn btn-success" type="button" tabindex="-1"><i class="fa fa-refresh"></i></button>
</span>
</div>
</div>
<div class="form-group mb5">
<select class="selectpicker show-tick" title="Please choose one" data-width="100%" data-toggle="tooltip" data-placement="right">
<option selected="" value="A">Option A</option>
<option value="B">Option B</option>
<option value="C">Option C</option>
</select>
</div>
</div>
<div class="col-sm-9">
<div class="jumbotron">
<h1>Hello, world!</h1>
<p>...</p>
<p><a class="btn btn-primary btn-lg" href="#" role="button">Learn more</a></p>
</div>
</div>
</div>
</div>