我真的很想做类似这样的事情...当我在左侧有图标的文本时:
我尝试过(不成功)按照以下方式进行操作:
<a href="#" class="icon">Text centered vertically in relation
to the background image</a>
CSS
a.icon {
background: url(image.png) 0 50%;
margin-top: -5%;
min-height: the-height-of-my-image-plus-the-negative-margin;
}