跳至内容
主题
餐厅
菜单
主题
餐厅
搜索
搜索
韩国厨房美食:揭秘最佳餐厅!
踏上充满活力的韩国美食之旅!准备好用以下美食挑逗您的味蕾吧
阅读更多 "
桑迪
8 月 13, 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; 显示项目(索引); });