在Chrome / Safari中,我的引导按钮内的图标看起来不错:
但是在Firefox中,该图标会下移一行:
我的字体图标浮在窗口中<button>
。
<!--html-->
<div class="btn-group btn-group-justified" role="group" aria-label="...">
<div class="btn-group" role="group">
<button type="button" class="btn btn-default btn-small">Cached logs<i class="fa fa-money"></i></button>
</div>
<div class="btn-group" role="group">
<button type="button" class="btn btn-default btn-small">Logs on mount<i class="fa fa-database"></i></button>
</div>
</div>
<!--style-->
i.fa {
float: right;
top: 2px;
position: relative;
font-size: 12pt;
}
.glyphicon, i.fa {
color: rgb(90, 90, 90);
top: 1px;
}
如何使Firefox版本像Chrome那样单行?
将图标移到文本的左侧。我不确定导致它不一致的根本原因-但这确实使两个浏览器都一致地呈现它。
<button type="button" class="btn btn-default btn-small"><i class="fa fa-database"></i>Logs on mount</button>
代替
<button type="button" class="btn btn-default btn-small">Logs on mount<i class="fa fa-database"></i></button>
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句