script.aculo.us - BlindDown 效果


描述

此效果模擬百葉窗,受影響元素的內容保持不變。

語法

可以使用以下兩種形式之一來使用此效果 −

new Effect.BlindDown('id_of_element', [options]);
OR
new Effect.BlindDown(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 BDEffect(element){
            new Effect.BlindDown(element, {duration:3});
         }
      </script>
   </head>
   
   <body>
      <div id = "myimage" onclick = "BDEffect(this);">
         <img src = "/images/scriptaculous.gif" alt = "script.aculo.us" />
         <h2>Click me to down the blind</h2>
      </div>
   </body>
</html>

將產生以下結果 −

scriptaculous_effects.htm
廣告