跳至内容
主题
餐厅
菜单
主题
餐厅
搜索
搜索
one pick 面食御膳餐厅 "Cement Seoul
大家好!周末,我和朋友去了梨泰院最热门的地方--Cement Seoul。这个地方
阅读更多 "
杰西
7 月 20, 2024
Chinese
English
Korean
Japanese
Spanish
Chinese
const carouselSlide = document.querySelector('.carousel-slide'); const items = document.querySelectorAll('.carousel-item'); const prevButton = document.querySelector('.carousel-prev'); const nextButton = document.querySelector('.carousel-next'); 让 index = 0; function showItem(index) { carouselSlide.style.transform = `translateX(${-index * 100}%)`; } nextButton.addEventListener('click', () => { index = (index + 1) % items.length; showItem(index); }); prevButton.addEventListener('click', () => { index = (index - 1 + items.length) % items.length; 显示项目(索引); });