1

我在我的应用程序中使用 ajax 动画扩展器。它在几乎所有浏览器中都能完美运行,除了 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”时会弹出一个弹出窗口,但问题在于鼠标悬停在弹出窗口上。当我将鼠标悬停在弹出窗口上时,弹出窗口消失了。

有人能说会是什么问题吗?

4

2 回答 2

1

在我看来,IE9 不记得通过 Animation Extender 所做的更改。即使是官方样本也不起作用。如果(例如)Display: none,并且您将其动画化为 Dislay: 块,则当动画停止时,它将在下一次重绘时恢复显示:none(您需要将鼠标移到元素上,或者以其他方式调用刷新)。我希望它会很快得到修复。

于 2011-06-18T21:31:40.603 回答
1

I realize the next step: Remove the following code in the control called from the AnimationExtender:

"opacity: 0; filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0);"

After that, the problem was fixed.

于 2012-03-12T17:38:01.617 回答