簡體   English   中英

jQuery淡入淡出幻燈片

[英]jQuery fadein fadeout Slideshow

誰能幫助我實現以下jQuery循環自動幻燈片顯示。 步驟如下:1.首先淡入幻燈片圖像,然后淡入字幕背景,最后淡入字幕文本。這里是可視示例。

http://www.markupxpert.com/slideshow/step1.jpg

http://www.markupxpert.com/slideshow/step2.jpg

http://www.markupxpert.com/slideshow/step3.jpg

謝謝保羅

關於jQuery fadeIn

fadeIn具有回調函數,動畫完成后將調用該函數。 您可以使用它來開始第二個動畫,如下所示:

$('#clickme').click(function() {

   // 1st anim starts here
   $('#slideshowImage').fadeIn('slow', function() {

       // 1st anim ended, 2nd starts here     
       $('#captionBackground').fadeIn('slow', function() {

         // 2nd anim ended, 3rd stars here
          $('#captionText').fadeIn('slow');        

       });        
   });
});

正如我注釋掉的那樣,動畫部分從click事件的回調函數開始。 當然,您可能不想通過單擊按鈕而不是循環來啟動動畫。 在這種情況下,您只需要中間部分。

另外,您需要修改jQuery選擇器以fadeIn適當的元素。 (可能它們不被稱為#slideshowImage左右)

我建議您不要執行該行為。 您可以根據需要使用或修改數十種jQuery幻燈片。

Google for jQuery slideshow ,找到最適合您需求的jQuery slideshow

一些例子:

25個jQuery Image Gallery / Slider教程和插件

33個功能強大的jQuery幻燈片(滑塊)插件和教程

23個最佳jQuery幻燈片(圖庫)插件

21個出色的jQuery Image Gallery / Slideshow插件

20個最佳jQuery幻燈片/圖片庫插件

等等...

這是您要搜索的插件: http : //fancybox.net/
大多數畫廊都是這樣做的。 查閱文檔,如果有一些您不了解的內容,請隨時提出問題:)
干杯

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM