瀏覽代碼

fix collection img

SyuanYu 3 年之前
父節點
當前提交
06688bddc6
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      themes/hugo-universal-theme-master/static/js/bhouse.js

+ 4 - 1
themes/hugo-universal-theme-master/static/js/bhouse.js

@@ -57,7 +57,10 @@ $('.style_house_sec02 .slider').on('beforeChange', function (event, slick, curre
   for (i = 0; i < heightImgIndex.length; i++) {
     console.log(heightImgIndex[i]);
     if (nextSlide == heightImgIndex[i]) {
-      allSlideImg[nextSlide].style.height = '500px';
+      allSlideImg[nextSlide].style.cssText = `
+      height: 500px; 
+      margin: auto;
+    `;
     } else {
       allSlideImg[heightImgIndex[i]].style.height = '0px';
     }