How to animate “visibility: hidden”?
问题 here is my problem... Can you help me please? $(".button").hover(function(){ $('.class').css({opacity: 1.0, visibility: "hidden"}).animate({opacity: 0}, 1200); },function(){ $('.class').css({opacity: 0.0, visibility: "visible"}).animate({opacity: 1}, 1200); }); It only animates when it is appearing. :-( 回答1: Try this way: $(".button").hover(function(){ $('.class').css("opacity", "1.0").animate({opacity: 0}, 1200, function(){ $('.class').css("visibility", "hidden"); }); },function(){ $('.class