-
让AI成为教育新基建
-
资源共建 · 名师云课 · AI学伴 · 精准学情
-
-
-
-
+
+
+
+
+
+
让AI成为教育新基建
+
资源共建 · 名师云课 · AI学伴 · 精准学情
+
+
+
+
+
+
+
+

+
+
+
+
+
+
+
AI资源工坊
+
一键生成教案、课件、习题,支持共建共享
+
+
+
+
+
+
+

+
+
+
+
+
+
+
精准学情分析
+
AI驱动的学情跟踪与分析,助力个性化教学
+
+
+
+
+
+
+

+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
@@ -726,6 +868,73 @@
this.classList.add('active');
});
});
+
+ // 轮播图功能
+ const carouselItems = document.querySelectorAll('.carousel-item');
+ const carouselIndicators = document.querySelectorAll('.carousel-indicator');
+ const prevBtn = document.querySelector('.carousel-control.prev');
+ const nextBtn = document.querySelector('.carousel-control.next');
+ let currentIndex = 0;
+ let interval;
+
+ // 初始化轮播
+ function initCarousel() {
+ // 启动自动轮播
+ startCarousel();
+
+ // 绑定控制按钮事件
+ prevBtn.addEventListener('click', prevSlide);
+ nextBtn.addEventListener('click', nextSlide);
+
+ // 绑定指示点事件
+ carouselIndicators.forEach((indicator, index) => {
+ indicator.addEventListener('click', () => {
+ goToSlide(index);
+ });
+ });
+
+ // 鼠标悬停时暂停轮播
+ const carousel = document.querySelector('.carousel');
+ carousel.addEventListener('mouseenter', pauseCarousel);
+ carousel.addEventListener('mouseleave', startCarousel);
+ }
+
+ // 显示指定幻灯片
+ function goToSlide(index) {
+ // 移除当前激活状态
+ carouselItems[currentIndex].classList.remove('active');
+ carouselIndicators[currentIndex].classList.remove('active');
+
+ // 更新索引
+ currentIndex = (index + carouselItems.length) % carouselItems.length;
+
+ // 添加新激活状态
+ carouselItems[currentIndex].classList.add('active');
+ carouselIndicators[currentIndex].classList.add('active');
+ }
+
+ // 下一张幻灯片
+ function nextSlide() {
+ goToSlide(currentIndex + 1);
+ }
+
+ // 上一张幻灯片
+ function prevSlide() {
+ goToSlide(currentIndex - 1);
+ }
+
+ // 暂停轮播
+ function pauseCarousel() {
+ clearInterval(interval);
+ }
+
+ // 开始轮播
+ function startCarousel() {
+ interval = setInterval(nextSlide, 5000);
+ }
+
+ // 初始化轮播
+ initCarousel();
});