jQuery Innerfade响应高度

时间:2014-08-04 06:51:28

标签: jquery html

我使用jQuery Innerfade创建幻灯片。幻灯片显示在响应式div中,因此幻灯片显示图像的宽度也会根据设备的分辨率而变化。

$('#services_slideshow').innerfade({
    animationtype: 'fade',
    speed: 750,
    timeout: 6000,
    type: 'sequence',
    containerheight: '228px'
});

<div id="services_slideshow">
    <img src="images/ss_6.jpg">
    <img src="images/services_four.jpg">
</div>
<p>
This is the text that follows the slideshow
</p>

上面的容器高度在桌面上看起来很好,但是当你在iPad上观看时,幻灯片图像宽度现在变小了,但容器高度仍然是228像素,导致幻灯片图像和文本之间存在巨大差距。

我尝试将容器高度设置为“自动”,但这不起作用。

如何设置容器高度以在分辨率更改时进行调整?

0 个答案:

没有答案
相关问题