高城美食--隐藏的宝石

高城美食

准备好开始一场海陆交汇的美食探险了吗?在韩国最北端的高城发现您的下一道美食!

阅读更多 "
zh_CNChinese
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; 显示项目(索引); });