wuyongxiang 4 lat temu
rodzic
commit
04170a109c
2 zmienionych plików z 4 dodań i 4 usunięć
  1. 2 2
      screenAndroid/home.html
  2. 2 2
      screenIos/home.html

+ 2 - 2
screenAndroid/home.html

@@ -228,13 +228,13 @@
 			var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
 			if (isAndroid) {
 				//如果为Android	
-				const ch = (20 * clientWidth) / (clientheight + 122)
+				const ch = (20 * clientWidth) / clientheight
 				console.log("长和宽", clientWidth, clientheight)
 				$('.swiper-slide').css("padding", `20% ${ch}%`)
 			}
 			if (isiOS) {
 				//如果为iOS	
-				const ch = (20 * clientWidth) / (clientheight + 272)
+				const ch = (20 * clientWidth) / clientheight
 				console.log("长和宽", clientWidth, clientheight)
 				$('.swiper-slide').css("padding", `20% ${ch}%`)
 			}

+ 2 - 2
screenIos/home.html

@@ -221,13 +221,13 @@
 			var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
 			if (isAndroid) {
 				//如果为Android	
-				const ch = (20 * clientWidth) / (clientheight + 122)
+				const ch = (20 * clientWidth) / clientheight
 				console.log("长和宽", clientWidth, clientheight)
 				$('.swiper-slide').css("padding", `20% ${ch}%`)
 			}
 			if (isiOS) {
 				//如果为iOS	
-				const ch = (20 * clientWidth) / (clientheight + 272)
+				const ch = (20 * clientWidth) / clientheight
 				console.log("长和宽", clientWidth, clientheight)
 				$('.swiper-slide').css("padding", `20% ${ch}%`)
 			}