2014-09-01 89 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