Part of the answer references GPT, GPT_Pro better solve the problem
When using swiper plug-in, How do you get three rows when the slidesPerColumn is set to 2 and the slidesPerView is set to 3?
This is because the slidesPerColumn property represents the number of slides in each column. When there are 2 slides in each column(that is, the slidesPerColumn is set to 2), the slidesPerView property represents how many slides there are in each page. In this case, if there are three slides in each page(that is, the slidesPerView is set to 3), three rows appear.
That is, if you want only 2 rows to appear, you need to set slidesPerView to 6(2 * 3 = 6) to get it.
The specific code is as follows:
// 初始化swiper实例
var swiper = new Swiper('.swiper-container', {
// 设置每一列中有2个slide
slidesPerColumn: 2,
// 设置每一页有6个slide
slidesPerView: 6,
spaceBetween: 10, // 间隔距离
});
If the answer is helpful, please accept it.