问题与动画扩展和IE9
问题描述:
我在我的应用程序中使用ajax动画扩展。它几乎可以在所有browsersexcept IE9中正常工作。我使用的代码:问题与动画扩展和IE9
<cc1:AnimationExtender ID="OpenAnimation" runat="server" TargetControlID="btnAddNewComment"
BehaviorID="OpenAnimationBehavior">
<Animations>
<OnClick>
<Sequence>
<%-- Disable the button so it can't be clicked again --%>
<EnableAction Enabled="false" />
<%-- Position the wire frame and show it --%>
<StyleAction AnimationTarget="flyout" Attribute="display" Value="block"/>
<%-- Move the wire frame from the button's bounds to the info panel's bounds --%>
<Parallel AnimationTarget="flyout" Duration=".3" Fps="25">
<Resize Width="850" Height="420" />
<Color PropertyKey="backgroundColor" StartValue="#AAAAAA" EndValue="#FFFFFF" />
</Parallel>
<%-- Move the panel on top of the wire frame, fade it in, and hide the frame --%>
<StyleAction AnimationTarget="info" Attribute="display" Value="block"/>
<FadeIn AnimationTarget="info" Duration=".2" />
<StyleAction AnimationTarget="flyout" Attribute="display" Value="none"/>
</Sequence>
</OnClick>
</Animations>
</cc1:AnimationExtender>
Corresponding JS function to play the animation is:
// function to open the animation popup
function OpenExtender(tempCommentID)
{
var behaveYourself = $find("OpenAnimationBehavior");
var onClickAnimation = behaveYourself.get_OnClickBehavior();
onClickAnimation.play();
return false;
}
虽然按钮“btnAddNewComment”弹出来了一下,但问题是在鼠标悬停时弹出股利。当我将鼠标移过弹出窗口时,弹出窗口消失。
难道有人说会有什么问题吗?
答
在我看来,IE9不记得通过动画扩展器所做的更改。即使官方样本不起作用。如果(例如)Display:none,并且您将其设置为Dislay:block,则当动画停止时,它将在下一次重绘时恢复Display:none(您需要将鼠标移到元素上,否则调用刷新)。我希望它能很快得到解决。
答
我知道下一步骤:
: 从AnimationExtender称为控制删除以下代码 “不透明度:0;过滤器:的progid:DXImageTransform.Microsoft.Alpha(不透明度= 0);”
之后,问题就解决了。
现在我通过添加全局CSS样式来解决它:* {opacity:1!important;它像一个魅力一样工作。 – SmartK8 2011-06-18 21:51:29
是的,这是设置不透明度的问题。我修好了它。谢谢你的努力。 – Anoop 2011-06-23 04:50:02