On this site, there are these cubes, titled "Events" "Mixes" and "Gallery." When one hovers over them, the cube has a rotate animation, and also on mouse out.
If you could tell me what the name of the plugin/module they are using, or how I can achieve the 开发者_运维百科same thing that would be great.
Link to Website with rotating cube buttons
I have looked at the source code and they appear to be using drupal, and I think the cubes are jquery powered, but I don't really know.
All they're doing is moving the background-position
up & down.
Here's the relevant piece of code they're using:
$(function(){
$('.sprite')
.css( {backgroundPosition: "0 0"} )
.mouseover(function(){
$(this).stop().animate({backgroundPosition:"(0 -176px)"}, {duration:500})
})
.mouseout(function(){
$(this).stop().animate({backgroundPosition:"(0 0)"}, {duration:500})
})
});
精彩评论