如何制作单个图像,被视为三个不同的图像? [英] How to make a single image, treated as three different images?

查看:74
本文介绍了如何制作单个图像,被视为三个不同的图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚浏览网站程式码,看到社交网路连结的图片

I was just going through a website code, and I saw an image for Social Networks link

当我看到网站时,我只看到图片的顶行。这意味着更深的顶部三个图像。

When I see the website, I only see the top row of the images. It means the darker top three images.

问题是当我的鼠标悬停在Facebook图片上时,只有Facebook图片成为轻微的Facebook图片,而其他两个链接也是如此。

The issue is when my mouse hovers over the facebook image, only facebook image becomes the light facebook image, and same happens for the other two links as well.

他们使用的代码如下:

<ul class="social-icons"> 
<li class="facebook"> 
    <a title="Facebook" href="http://facebook.com/eclyptix">Facebook</a> 
</li> 
<li class="twitter"> 
    <a title="Twitter" href="http://twitter.com/eclyptix">Twitter</a> 
</li> 
<li class="linkedin"> 
    <a title="LinkedIn" href="http://linkedin.com/company/eclyptix">LinkedIn</a> 
</li> 

我们感谢您的帮助。

谢谢
Zeeshan

Thank you Zeeshan

推荐答案

@ Zeeshan;它被称为 sprite

查看本文了解更多 http://css-tricks.com/158-css-sprites/

@ Zeeshan; it's called sprite
check this article for more http://css-tricks.com/158-css-sprites/

请检查此示例 http://jsfiddle.net/sandeep/F4wpW/

这篇关于如何制作单个图像,被视为三个不同的图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆