风口财经对话全球工业自动化专家:推进转型升级!
2021/09/28
diff --git a/static/css/index.css b/static/css/index.css
index e69de29..f2a9871 100644
--- a/static/css/index.css
+++ b/static/css/index.css
@@ -0,0 +1,8 @@
+.overlay {
+ transition: transform 2s ease-in-out;
+ transform: translateX(-100%);
+}
+
+.overlay.active {
+ transform: translateX(0);
+}
\ No newline at end of file
diff --git a/static/js/index.js b/static/js/index.js
index a208f85..e747316 100644
--- a/static/js/index.js
+++ b/static/js/index.js
@@ -35,7 +35,6 @@ var product_swiper = new Swiper(".product-swiper", {
$(document).ready(() => {
$(".product-prev-button").click(() => {
- console.log("1")
product_swiper.slidePrev()
})
$(".product-next-button").click(() => {
@@ -50,7 +49,7 @@ const carousel_swiper = new Swiper(".carousel-swiper", {
delay: 4000,
disableOnInteraction: false,
},
- snpeed: 300,
+ speed: 300,
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
@@ -59,23 +58,14 @@ const carousel_swiper = new Swiper(".carousel-swiper", {
slideChangeTransitionStart: function () {
$('.carousel-aos').hide(0);
$('.carousel-aos').removeClass('aos-init').removeClass('aos-animate');
- $('.sweep-overlay').removeClass('hidden');
- $('.sweep-overlay').addClass('animate');
+ $('.overlay').hide(0);
+ $('.overlay').removeClass('active');
},
slideChangeTransitionEnd: function () {
$('.carousel-aos').show(0);
$('.carousel-aos').addClass('aos-init').addClass('aos-animate');
- $('.sweep-overlay').removeClass('animate');
- $('.sweep-overlay').addClass('hidden');
- },
- slideChange: function () {
- $(".carousel-pagination-item").each((index, elem) => {
- if (index == this.realIndex) {
- $(elem).addClass("carousel-pagination-item-active")
- } else {
- $(elem).removeClass("carousel-pagination-item-active")
- }
- })
+ $('.overlay').show(0);
+ $('.overlay').addClass('active');
},
},
});