Jquery Cycle + Firefox Squishing Images

前端 未结 7 1378
走了就别回头了
走了就别回头了 2020-12-10 07:41

I am running jQuery Cycle for an image gallery. View the link: Here

My problem is that the images are getting squished when viewed in firefox. The problem disappears

7条回答
  •  庸人自扰
    2020-12-10 08:35

    You can use a solution similar to making youtube videos responsive. You need to know the ratio of your width to height, and add that as padding-bottom to the cycling div. For my 1024X680 photos, I used 680/1024 = 66.4%

    In your case, I believe

    #slideshow{ padding-bottom:66.4%; } will show the image unshrunk. I have no idea what the actual height and width values you are working with, so substitute your own. I had to use this solution when the $(window).load solution proved maddeningly ineffective -- so now I use both.

    This is better than setting the dimensions of the image, because it's slides into a fluid, responsive enviroment.

提交回复
热议问题