内嵌显示图像和文本 [英] Display image and text inline
本文介绍了内嵌显示图像和文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我无法在标题的每一面上获取图片。我试过显示器:内嵌块,但这不是为我做的。
这是
I'm having trouble getting an image on each side of a heading. I've tried display:inline-block but that's not doing it for me. Here is the jsfiddle
.inline-image{display:inline-block}
The imgur pictures may not be showing up but you get the idea. It is supposed to look like this:
Details: Using Bootstrap v3.3.1
解决方案
You need to add display: inline-block
to the actual element(s) not the parent:
.inline-image img, .inline-image h3{
display:inline-block;
vertical-align: middle;
}
Then you can adjust the vertical-align
property to middle
这篇关于内嵌显示图像和文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文