script.aculo.us - 放大效果


描述

此效果產生縮小物件影像的錯覺。專案從形成完整專案的小點開始生長。

語法

您可以使用以下兩個表單之一來使用此效果 -

new Effect.Grow('id_of_element', [options]);
OR
new Effect.Grow(element, [options]);

特定於效果的引數

此效果沒有任何其他引數,除了常見引數

例項

<html>
   <head>
      <title>script.aculo.us examples</title>

      <script type = "text/javascript" src = "/javascript/prototype.js"></script>
      <script type = "text/javascript" src = "/javascript/scriptaculous.js?load = effects"></script>
		
      <script type = "text/javascript">
         function GrowEffect(element){
            new Effect.Grow(element, {duration:3});
         }
      </script>
		
   </head>

   <body>
      <div id = "myimage" onclick = "GrowEffect(this);">
         <img src = "/images/scriptaculous.gif" alt = "script.aculo.us" />
         <h2>Click me to see  Grow Effect</h2>
      </div>
   </body>
</html>

這將產生以下結果 -

scriptaculous_effects.htm
廣告