0
我想讓圖像出現在文字的中間...現在圖標稍微高一點。有圖標出現在中間完美
我試着使用:
vertical-align:middle;
但它使人們出現低則文本。有沒有什麼辦法讓它出現在中間,而無需使用margin
或padding
HTML:
<div class="text">Text: </div>
<div id="icon"><img src="http://i60.tinypic.com/35i3ltu.png" height="30" width="30" /></div>
CSS:
.text{
color:#fff;
display:inline-block;
text-shadow: 5px 5px 5px #6699ff;
font-size:2.3em;
font-weight: bold;
font-family: avenir;
}
#icon{
display:inline-block;
}
http://jsfiddle.net/16xa5a2g/ – slashsharp 2014-10-07 19:05:07