[英]How to chage width 1024px to 100% in js script
<script>
$(function(){
var slider = new BeaverSlider({
structure: {
container: {
id: "my-slider",
width: '1024',
height: 520,
}
},
content: {
images: [
"images/slider/1.jpg",
"images/slider/2.jpg",
"images/slider/3.jpg",
"images/slider/4.jpg",
"images/slider/5.jpg",
"images/slider/7.jpg",
"images/slider/8.jpg",
]
},
animation: {
effects: effectSets["slider: big set 2"],
interval: 1000
}
});
});
</script>
You can try with screen.width
instead of 100% that you asked. 您可以尝试使用
screen.width
而不是您要求的100%。
...
width: screen.width,
...
Just change: 只是改变:
id: "my-slider", width: '1024'
to: 至:
id: "my-slider", width: '100%'
??? ???
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.