2011-06-10 93 views
1

我在我的應用程序中使用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」彈出來了一下,但問題是在鼠標懸停時彈出股利。當我將鼠標移過彈出窗口時,彈出窗口消失。

難道有人說會有什麼問題嗎?

回答

1

在我看來,IE9不記得通過動畫擴展器所做的更改。即使官方樣本不起作用。如果(例如)Display:none,並且您將其設置爲Dislay:block,則當動畫停止時,它將在下一次重繪時恢復Display:none(您需要將鼠標移到元素上,否則調用刷新)。我希望它能很快得到解決。

+0

現在我通過添加全局CSS樣式來解決它:* {opacity:1!important;它像一個魅力一樣工作。 – SmartK8 2011-06-18 21:51:29

+0

是的,這是設置不透明度的問題。我修好了它。謝謝你的努力。 – Anoop 2011-06-23 04:50:02

1

我知道下一步驟:

: 從AnimationExtender稱爲控制刪除以下代碼 「不透明度:0;過濾器:的progid:DXImageTransform.Microsoft.Alpha(不透明度= 0);」

之後,問題就解決了。