jQuery的动画背景图像过渡 [英] Jquery Animate Background Image Transition

查看:222
本文介绍了jQuery的动画背景图像过渡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个导航栏,鼠标悬停在某个项目时,背景图像被改变,工作正常。不过,我想这一形象,从顶部滑动,当你停止徘徊滑回来了。我一直在试图用jQuery做到这一点,用css bacgroundImage和滑动或切换,但没有,似乎工作。我怎样才能做到这一点使用Jquery?

I have a navigation bar that when hovering over an item, the background image is changed, that works fine. However, I would like this image to slide in from the top, and slide back up when you stop hovering. I've been trying to do this with JQuery, using css bacgroundImage and sliding or toggling, but none of that seems to work. How can I do this using Jquery?

推荐答案

或者你可以使用CSS-精灵

Or you can use css-sprite

<一个href=\"http://snook.ca/archives/javascript/jquery-bg-image-animations/\">http://snook.ca/archives/javascript/jquery-bg-image-animations/

演示: http://snook.ca/technical/jquery-bg/

这篇关于jQuery的动画背景图像过渡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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