layui.use(['carousel'], function () {
$ = layui.$;
var carousel = layui.carousel;
var i = 0
var ins
var widthView = document.body.clientWidth;
width = 1920 //获取宽度
height = 500 //获取高度
bili = widthView / width;
height = height * bili;
console.log(height);
ins = carousel.render({
elem: '#flash',
width: "100%", //设置容器宽度q
height: height,
arrow: 'hover', //始终显示箭头
anim: 'default', //切换动画方式
autoplay: false
});
});
游客 2022-04-09 20:59:50
我想做一个,怎么联系