【发布时间】:2012-07-15 08:34:56
【问题描述】:
我正在尝试在动画中调整 Flash 对象的大小(并最终移动它,但首先要做的是),但它似乎根本不起作用。
如果我只更改 Jquery 中的 css 属性,它可以工作。
动画无效:
$('#greenbtn').hover(function(){
$(this).animate({width: '242px', height: '63px'}, 'fast', 'easeOutSine');
console.log('here1');
});
$('#greenbtn').mouseleave(function(){
$(this).animate({width: '228px', height: '57px'}, 'fast', 'easeOutSine');
console.log('here2');
});
工作:
$('div.leftB').hover(function(){
$('#greenbtn').css({width: '242px', height: '63px'});
});
$('div.leftB').mouseleave(function(){
$('#greenbtn').css({width: '228px', height: '57px'});
});
.animate() 根本无法在 flash 上运行还是我的代码有问题?
感谢您的帮助!
【问题讨论】:
-
您在工作示例中使用另一个元素作为触发器?
-
你试过触发那个选择器的动画吗?喜欢
$('#greenbtn').animate( ...)? -
我没有尝试过,因为动画应该在悬停时开始