css - Sprite 雪碧图有没有可能和文本一起合作?
迷茫
迷茫 2017-04-17 11:54:55
0
2
481

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

.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元素没内容就很好,有文字就不对齐了

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(2)
Ty80

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

大家讲道理

The text does not require a request and is meaningless

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!