使jquery滑动滑块宽度为100%
make jquery slidy slider width 100%
我正在使用这个滑块->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>
试试这个小提琴
$('#menu').slidy({
animation: 'slide',
children: 'a',
menu: true,
pause: true,
speed: 1100,
time: 400001111111111111,
width: $(document).width(),
height: $(document).height()
});
根据slidy自己的文档,"宽度"选项始终以像素为单位,而不是百分比(https://github.com/wbotelhos/slidy)。
我建议使用不同的滑块来支持百分比宽度。
使用宽度:"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;"/>
</div
相关文章:
- 如何在jQuery Mobile中设置100%宽度的输入类型日期
- 使jquery滑动滑块宽度为100%
- 使用JQuery使滚动条为@bottom时DIV的宽度为100%
- 使用Ajax和Jquery一次加载100个块的Wordpress帖子
- Dreaded 100%边栏高度-jQuery修复,但另一个问题出现了
- 使用jquery regex在文本字段中输入0到100
- 如何在jquery中设置100%的宽度百分比
- 具有 100% 宽度元素的 Jquery 水平平移
- Blueimp jquery文件上传插件在上传100%后抛出错误到机架空间云存储
- 隐藏 3 列并将其中一列扩展为 100% 行时的 jQuery 过渡效果
- JQuery:集合数组长度上限为 100
- 无法达到高度:使用jQuery Mobile时达到100%
- jQuery :切换页脚,将大小从 #px 调整为 100% 宽度并返回
- Jquery getScript(在 ajax 调用之后)使用 100% CPU
- JQuery 滚动到不适用于高度和宽度 100%
- JQuery UI滑块拖动到100时显示错误的值(显示0)
- 使用jQuery单击时垂直滚动100%
- jQuery错误:无法使用'在'操作员搜索'使用'在100
- Jquery.animate 100%高度不起作用
- 如何使用jquery将xxxx表行拆分为每个100的数组,并考虑四舍五入