소스 검색

更改适配

xiezhiming 3 년 전
부모
커밋
1d8945e59f
1개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 5 3
      src/js/staticInfo.js

+ 5 - 3
src/js/staticInfo.js

@@ -215,14 +215,16 @@ function renderCalculate(){
 		}
 	})	
 	// 适配改变样式
-	$(window).bind('load resize',function(){
+	function Adaptation(){
 		let widths=$(document).width();
-		if(widths<=960) {
+		if(widths<=1025) {
 			$('.cgs_top').addClass('cgs_tops')
 		}else{
 			$('.cgs_top').removeClass('cgs_tops')
 		}
-	})	
+	}
+	Adaptation()
+	$(window).bind('load resize',Adaptation)		
 	
 }