Latest web development tutorials

jQuery UI API - effetti di rimbalzo (Bounce effetto)

categoria

Effetti speciali (Effetti)

uso

Descrizione: L'effetto di rimbalzo (Effetto rimbalzo) radunare un elemento. Quando utilizzato in combinazione con il nascondere o mostrare l'ultima volta, o al primo rimbalzo mostrerà effetto / fade-out fade-in.

bounce

参数 类型 描述 默认值
distance Number 最大的反弹距离,以像素为单位。 20
times Integer 元素反弹的次数。当隐藏或显示时,会为淡入/淡出效果添加半个反弹。 5

Esempi

Utilizzare l'effetto di rimbalzo (Bounce Effect) passaggio di un div.

<! Html Doctype>
<Html lang = "it">
<Head>
  <META charset = "utf-8">
  <Title> Ritorno effetti (Bounce Effect) Demo </ title>
  <Link rel = "stylesheet" href = "// code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
  <Style>
  #toggle {
    width: 100px;
    altezza: 100px;
    sfondo: #ccc;
  }
  </ Style>
  <Src = "script // code.jquery.com/jquery-1.10.2.js"> </ script>
  <Src = "script // code.jquery.com/ui/1.10.4/jquery-ui.js"> </ script>
</ Head>
<Body>
 
<P> Clicca ovunque per passare. </ P>
<Div id = "Toggle"> </ div>
 
<Script>
$ (Document) .Click (function () {
  $ ( "#toggle") .toggle ( "Bounce", {volte: 3}, "lento");
});
</ Script>
 
</ Corpo>
</ Html>