CSS 翻转精灵
I have used this effect before, everything is in order (As far as I see), but it's just not working. What have I missed?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
由于您的精灵是水平排列的,因此您需要像这样偏移悬停状态:
Since your sprite is arranged horizontally, you will want to offset the hover state like this:
你的背景偏移似乎是错误的 - 而不是 0 77px (这是一个 y 偏移,沿着错误的轴),尝试 -77px 0。
Your background offset seems to be wrong - instead of 0 77px (which is a y-offset, along the wrong axis), try -77px 0.
只需更改
为
just change
to
嗯,你的背景位置是调整顶部起始位置而不是左侧起始位置?
Um, your background-position is adjusting the top starting position rather than the left starting position?