2014-09-01 64 views
0

我需要在我的網站頁面上製作我的類別的大拇指。當用戶將鼠標懸停在拇指上時,它會改變很少的圖像。所以我發現這個教程,到目前爲止是工作,但它裁剪圖像。如何才能做到不裁剪它們?與jquery多圖像交換

jQuery(function($){ 

     // Cycle plugin 
     $('.slides').cycle({ 
      fx:  'none', 
      speed: 1000, 
      timeout: 200 
     }).cycle("pause"); 

     /* Pause play on hover */ 
     $('.slideshow-block').hover(function(){ 
      $(this).find('.slides').addClass('active').cycle('resume'); 
     }, function(){ 
      $(this).find('.slides').removeClass('active').cycle('pause'); 
     }); 

    }); 

Here is the website with tutorial

Here is the DEMO on Js Fiddle

上演示的圖像是大的,你可以看到他們是如何裁剪。

+1

您的小提琴鏈接不工作。 – Esko 2014-09-01 09:28:06

+0

已編輯。對不起,我已經添加了一些代碼,因爲沒有讓我保存編輯沒有.. – Goro 2014-09-01 09:31:10

回答

1

請問您可以添加下面的CSS並檢查。

.slides img{width:100%; } 
+0

感謝您的重播。這裏是更新的版本,它是相同的[小提琴](http://jsfiddle.net/d45vhcq4/1/) – Goro 2014-09-01 10:55:26

+0

@Goro我沒有看到小提琴的變化 – sameer 2014-09-01 10:57:18

+0

請爲img不添加寬度100%.slides – sameer 2014-09-01 10:59:19