如何使用 bootstrap btn-group
对齐其他元素?
<div class="btn-toolbar text-center">
<div class="pull-left">
<span class="glyphicon glyphicon-envelope " style="font-size:1.5em;"></span>
<label>Title</label>
</div>
<div class="btn-group btn-group-sm pull-right">
<a href="#" title="Open" class="btn btn-default clear-filter"><span class="glyphicon glyphicon-open"></span></a>
<a href="#" title="Print" class="btn btn-default clear-filter"><span class="glyphicon glyphicon-print"></span></a>
<a href="#" title="Edit" class="btn btn-default clear-filter"><span class="glyphicon glyphicon-edit"></span></a>
</div>
</div>
这看起来像,我希望文本和图标是内联的。
编辑:
现在文本与按钮内联,但图标不是。
<div class="pull-left">
<span class="glyphicon glyphicon-envelope " style="line-height: 30px; font-size: 1.5em; vertical-align: middle;"></span>
<label style="line-height:30px;">Title</label>
</div>
最佳答案
请试试这个:
.glyphicon {
position: relative;
top: -1px;
display: inline-block;
font-family: 'Glyphicons Halflings';
-webkit-font-smoothing: antialiased;
font-style: normal;
font-weight: normal;
line-height: 1;
vertical-align: middle;
}
关于html - 如何设置标签的垂直中心和 btn-group Bootstrap,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36396944/