我正在使用这个滑块-> http://writerservices.us/slidy/作为您的信息。
我需要使滑块宽度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滑块代码如下所示
<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>发布于 2013-12-12 23:28:31
试试这个小提琴
$('#menu').slidy({
animation: 'slide',
children: 'a',
menu: true,
pause: true,
speed: 1100,
time: 400001111111111111,
width: $(document).width(),
height: $(document).height()
});发布于 2013-12-12 23:19:38
根据slidy自己的文档,“宽度”选项总是以像素而不是百分比(https://github.com/wbotelhos/slidy)提供。
我建议使用支持百分比宽度的不同滑块。
发布于 2013-12-12 23:28:10
使用宽度:“100%!重要”
<div id="default" style="width:100% !important;">
<img src="img/image-1.jpg" style="width:100% !important;"/>
<img src="img/image-2.jpg" style="width:100% !important;"/>
<img src="img/image-3.jpg" style="width:100% !important;"/>
</divhttps://stackoverflow.com/questions/20555753
复制相似问题