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
广告
© . All rights reserved.