search

Home  >  Q&A  >  body text

css - Sprite 雪碧图有没有可能和文本一起合作?

我尝试雪碧图的左图片右文字效果:

.imgShareLeft {text-align:center;display:inline-block;*display:inline;*zoom:1;padding-left:16px;height:16px;background-image:url(../png/img.png);background-repeat:none;}
.imgaccept {background-position:0px 0px;}....

这里每个Sprite是16*16.包裹在某个元素里,如果该元素没有文字,很好.有文字的话就没法对齐了:图片好像靠上一点了.

<h3><a class="imgShareLeft imgaccept "></a><i>XXX预警系统</i></h3>

比如这里a元素没内容就很好,有文字就不对齐了

迷茫迷茫2770 days ago518

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 11:56:55

    That’s it, and then the demo is not posted, there is nothing, how do you see it

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 11:56:55

    The text does not require a request and is meaningless

    reply
    0
  • Cancelreply