diff --git a/css/style.css b/css/style.css index 06d6250..26fa422 100644 --- a/css/style.css +++ b/css/style.css @@ -332,8 +332,7 @@ } /* 指示点 */ -.news-swiper .swiper-pagination-bullet, -.information-swiper .swiper-pagination-bullet { +.new-list .swiper-pagination-bullet { width: 12px; height: 12px; margin-top: 16px !important; @@ -342,13 +341,11 @@ background-color: rgba(14, 53, 127, 0); } -.news-swiper .swiper-pagination-bullet:nth-of-type(1), -.information-swiper .swiper-pagination-bullet:nth-of-type(1) { +.new-list .swiper-pagination-bullet:nth-of-type(1){ margin-top: 0; } -.news-swiper .swiper-pagination-bullet-active, -.information-swiper .swiper-pagination-bullet-active { +.new-list .swiper-pagination-bullet-active{ background-color: rgba(14, 53, 127, .5); border: 0; } @@ -3128,8 +3125,7 @@ } /* 分页样式 */ - .news-swiper .swiper-pagination-bullet, - .information-swiper .swiper-pagination-bullet { + .new-list .swiper-pagination-bullet { width: .2rem; height: .2rem; margin: 0 .1rem !important; diff --git a/index.html b/index.html index 68be194..ef7fc0f 100644 --- a/index.html +++ b/index.html @@ -152,7 +152,7 @@
-
+
还山川秀丽 建绿色矿山
@@ -198,7 +198,7 @@
-
+
还山川秀丽 建绿色矿山
diff --git a/js/script.js b/js/script.js index fc37832..cfb82f0 100644 --- a/js/script.js +++ b/js/script.js @@ -59,7 +59,7 @@ $(function(){ }) if(window.innerWidth <= 960){ // 公司新闻切换 - var newsSwiper = new Swiper('.news-swiper',{ + var newsSwiper = new Swiper('.new-list>.swiper',{ loop:true,//开启循环播放 autoplay: {//开启自动播放 delay:2000, @@ -69,28 +69,13 @@ $(function(){ slidesPerView: "auto", centeredSlides:true, pagination: { - el: '.news-swiper .swiper-pagination', - clickable :true, - }, - }); - // 区域动态切换 - var informationSwiper = new Swiper('.information-swiper',{ - loop:true,//开启循环播放 - autoplay: {//开启自动播放 - delay:2000, - disableOnInteraction: false,//触摸后不会停止自动滚动 - pauseOnMouseEnter: true,//鼠标置于swiper时暂停自动切换,鼠标离开时恢复自动切换。 - }, - slidesPerView: "auto", - centeredSlides:true, - pagination: { - el: '.information-swiper .swiper-pagination', + el: '.new-list>.swiper .swiper-pagination', clickable :true, }, }); }else{ // 公司新闻切换 - var newsSwiper = new Swiper('.news-swiper',{ + var newsSwiper = new Swiper('.new-list>.swiper',{ direction: 'vertical', //向上 loop:true,//开启循环播放 autoplay: {//开启自动播放 @@ -103,25 +88,7 @@ $(function(){ crossFade: true, }, pagination: { - el: '.news-swiper .swiper-pagination', - clickable :true, - }, - }); - // 区域动态切换 - var informationSwiper = new Swiper('.information-swiper',{ - direction: 'vertical', //向上 - loop:true,//开启循环播放 - autoplay: {//开启自动播放 - delay:2000, - disableOnInteraction: false,//触摸后不会停止自动滚动 - pauseOnMouseEnter: true,//鼠标置于swiper时暂停自动切换,鼠标离开时恢复自动切换。 - }, - effect : 'fade', - fadeEffect: { - crossFade: true, - }, - pagination: { - el: '.information-swiper .swiper-pagination', + el: '.new-list>.swiper .swiper-pagination', clickable :true, }, });