最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

.fadeIn()

.fadeIn( [ duration ], [ callback ] ) 返回: jQuery

描述: 通過淡入的方式顯示匹配元素。

  • version added: 1.0.fadeIn( [ duration ], [ callback ] )

    duration一個字符串或者數(shù)字決定動畫將運行多久。

    callback在動畫完成時執(zhí)行的函數(shù)。

  • version added: 1.4.3.fadeIn( [ duration ], [ easing ], [ callback ] )

    duration一個字符串或者數(shù)字決定動畫將運行多久。

    easing一個用來表示使用哪個緩沖函數(shù)來過渡的字符串

    callback在動畫完成時執(zhí)行的函數(shù)。

.fadeIn()方法通過匹配元素的不透明度做動畫效果。

延時時間是以毫秒為單位的,數(shù)值越大,動畫越慢,不是越快。字符串 'fast''slow' 分別代表200和600毫秒的延時。如果提供任何其他字符串,或者這個duration參數(shù)被省略,那么默認使用400毫秒的延時

如果提供回調(diào)函數(shù)參數(shù),回調(diào)函數(shù)會在動畫完成的時候調(diào)用。這個對于將不同的動畫串聯(lián)在一起按順序排列是非常有用的。這個回調(diào)函數(shù)不設(shè)置任何參數(shù),但是this是存在動畫的DOM元素,如果多個元素一起做動畫效果,值得注意的是這個回調(diào)函數(shù)在每個匹配元素上執(zhí)行一次,不是這個動畫作為一個整體。

我們可以給任何元素做動畫,比如一個簡單的圖片:

<div id="clickme">
      Click here
    </div>
    <img id="book" src="book.png" alt="" width="100" height="123" />
    With the element initially hidden, we can show it slowly:
    $('#clickme').click(function() {
      $('#book').fadeIn('slow', function() {
        // Animation complete
      });
    });

注意:

  • 所有的jQuery效果,包括 .fadeIn(),能使用jQuery.fx.off = true關(guān)閉全局性。更多信息請查看jQuery.fx.off。

Examples:

Example: 一個一個的隱藏divs,在600毫秒內(nèi)完成這些動畫。

<!DOCTYPE html>
<html>
<head>
  <style>
    span { color:red; cursor:pointer; }
    div { margin:3px; width:80px; display:none;
      height:80px; float:left; }
      div#one { background:#f00; }
      div#two { background:#0f0; }
      div#three { background:#00f; }
    </style>
  <script src="http://code.jquery.com/jquery-latest.min.js"></script>
</head>
<body>
  <span>Click here...</span>

    <div id="one"></div>
    <div id="two"></div>
    <div id="three"></div>
<script>
      $(document.body).click(function () {
        $("div:hidden:first").fadeIn("slow");
      });
    </script>

</body>
</html>

Demo:

Example: Fades a red block in over the text. Once the animation is done, it quickly fades in more text on top.

<!DOCTYPE html>
<html>
<head>
  <style>
      p { position:relative; width:400px; height:90px; }
      div { position:absolute; width:400px; height:65px; 
        font-size:36px; text-align:center; 
        color:yellow; background:red;
        padding-top:25px; 
        top:0; left:0; display:none; }
        span { display:none; }
      </style>
  <script src="http://code.jquery.com/jquery-latest.min.js"></script>
</head>
<body>
  <p>
        Let it be known that the party of the first part
        and the party of the second part are henceforth
        and hereto directed to assess the allegations
        for factual correctness... (<a href="#">click!</a>)
        <div><span>CENSORED!</span></div>

      </p>
<script>
        $("a").click(function () {
          $("div").fadeIn(3000, function () {
            $("span").fadeIn(100);
          });
          return false;
        }); 

      </script>

</body>
</html>

Demo:

jQuery 1.6 API 中文版腳本之家整理、修訂 (2011年6月)
龙岩市| 洪洞县| 宁化县| 峡江县| 图片| 佛教| 黎城县| 保定市| 油尖旺区| 高密市| 靖远县| 三河市| 高雄县| 雅江县| 万山特区| 镇安县| 石阡县| 福州市| 阜康市| 尉氏县| 伊通| 邳州市| 林芝县| 淄博市| 永清县| 曲阜市| 凯里市| 宁晋县| 同江市| 定南县| 错那县| 沛县| 莒南县| 屏南县| 黄平县| 波密县| 佛坪县| 扎囊县| 民丰县| 大兴区| 瑞昌市|