跳至内容
主题
餐厅
菜单
主题
餐厅
搜索
搜索
品尝地道的本地风味:江津最佳餐厅
踏上江津精致地方美食之旅,品尝地道传统美食。雪城四堂 (설성식당)
阅读更多 "
杰西
8 月 14, 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; 显示项目(索引); });