我正在使用这个 slider -> http://writerservices.us/slidy/供您引用。
我需要将 slider 宽度设置为 100%,因此在每个分辨率下它都保持 100%。
<script type="text/javascript">
$(function() {
$('#default').slidy();
$('#pause').slidy({
animation: 'mouseenter',
cursor: 'wait',
pause: true
});
$('#menu').slidy({
animation: 'slide',
children: 'a',
menu: true,
pause: true,
speed: 1100,
time: 400001111111111111,
width: 1300,
height: 400
});
$('.group').slidy({
animation: 'slide',
height: 97,
width: 240
});
});
</script>
这是 html js 代码,有可变宽度,打赌当我写 width: "100%"
它不会做我想要的。
html slider 代码看起来像这样
<div id="menu">
<a href="javascript:void(0);"><img src="img/image-2.jpg" title="Cargo handling"/></a>
<a href="javascript:void(0);"><img src="img/image-3.jpg" title="Cargo charter flights"/></a>
</div>
最佳答案
试试这个 fiddle
$('#menu').slidy({
animation: 'slide',
children: 'a',
menu: true,
pause: true,
speed: 1100,
time: 400001111111111111,
width: $(document).width(),
height: $(document).height()
});
关于javascript - 使 jquery 滑动 slider 宽度 100%,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20555753/