CSS引导:将图标添加到h1 [英] CSS bootstrap: add icon to h1
本文介绍了CSS引导:将图标添加到h1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在 h1
中添加图标(Bootstrap Glyphicons),但图标
不在文本
。如何解决此问题?!
i add icon(Bootstrap Glyphicons) in h1
but icon
not in text baseline
. how to fix This?!
代码:
<h1 ><a><i class="icon-play"></i>TEST TEXT</a></h1>
推荐答案
对于Bootstrap版本3,
For Bootstrap version 3 use this.
<h1>Hi this is heading<span class="glyphicon glyphicon-star"></span> Star</h1>
请参阅此 jsfiddle。
See this jsfiddle.
您的图标大小会根据其父级的大小而改变。
your icon size will change according to size of its parent.
这篇关于CSS引导:将图标添加到h1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文