完成大作业服务端代码,新建管理端,管理端不可用
This commit is contained in:
14
Project/Service/static/js/slideshow.js
Normal file
14
Project/Service/static/js/slideshow.js
Normal file
@@ -0,0 +1,14 @@
|
||||
let slideIndex = 0;
|
||||
const slides = document.getElementById('slide-container');
|
||||
const totalSlides = slides.children.length;
|
||||
|
||||
function showSlides() {
|
||||
slideIndex++;
|
||||
if (slideIndex >= totalSlides) {
|
||||
slideIndex = 0;
|
||||
}
|
||||
slides.style.transform = 'translateX(' + (-slideIndex * 100) + '%)';
|
||||
setTimeout(showSlides, 5000); // Change image every 5 seconds
|
||||
}
|
||||
|
||||
showSlides();
|
||||
Reference in New Issue
Block a user