我尝试在 Zoomer.js 中为动画功能编辑 JS,代码如下:
$('.title').animate({marginLeft:'2px',marginTop:'65px'},d.speedTitle).css({'z-index':'10','position':'absolute','float':'none'})}}},function(){$(this).css({'z-index':'0'});
$(this).find('img').removeClass("hover").stop().animate({marginTop:'0',marginLeft:'0',top:'0',left:'0',width:'100px',height:'100px',padding:'0px'},d.speedRemove);$(this).find('.title').remove()})}}})(jQuery);
我希望小红框从下向上而不是从上到下进行动画处理。我认为这就像将 marginTop:'65px' 更改为 marginBottom:'35px' 一样简单,但这不是诀窍。
我读过使用 position:absolute 会使 marginBottom 无效,但如果我使用任何其他位置,它会破坏效果。如果这是正确的,是否有解决方法?如果这不正确,你能告诉我哪里出错了吗?
我感谢大家的时间和投入。
谢谢!