我是 Splidejs 的新手。
我想在我的网页中制作幻灯片,以便在页面加载时自动播放。
我尝试使用此代码,但它没有完成我的任务(我将自动播放属性设置为 true)。
document.addEventListener( 'DOMContentLoaded', function () {
new Splide('#image-slider').mount() , {
autoplay:true,
type : 'loop',
cover : true,
height : '1000rem',
perPage:3,
};
} );