Explorar el Código

Merge remote-tracking branch 'origin/Icdsnlms220307' into Icdsnlms220307

zhouna hace 3 años
padre
commit
0f1ec2940b
Se han modificado 3 ficheros con 40 adiciones y 38 borrados
  1. 30 37
      src/css/staticInfo.less
  2. 1 0
      src/index.js
  3. 9 1
      src/js/staticInfo.js

+ 30 - 37
src/css/staticInfo.less

@@ -627,42 +627,35 @@
 	}
 	
 }
-@media screen and (max-width: 960px) {
-    .computedgs{
-		.cgs_top{
-			.l_content{
-				width: 100%;
-				display: flex;
-				justify-content: center;
-			}
-			.d_inpt {
-			    display: inline-block;
-			    position: relative;
-			    width: 30%;
-				
-			}
-			.gs_wzs{
-				margin-right: 16px;
-			}
-			.gs_wzl{
-				margin-left: 16px;
-			}
-			.gs_ipt{
-				margin: 0px;
-				width: 100%;
-			}
-			.r_content{
-				width: 100%;
-				display: flex;
-				justify-content: center;
-				margin-left: 0px ;
-			}
-			.yz{
-				left:0px;
-			}
+.computedgs{
+	.cgs_tops{
+		.l_content{
+			width: 100%;
+			display: inline-block;
+		}		
+		.d_inpt {
+		    display: inline-block;
+		    position: relative;
+		    width: 30%;
+			
+		}		
+		.gs_wzs{
+			margin-right: 16px;
+		}		
+		.gs_wzl{
+			margin-left: 16px;
+		}		
+		.gs_ipt{
+			margin: 0px;
+			width: 100%;
+		}		
+		.r_content{
+			width: 100%;
+			display: inline-block;
+			margin-left: 0px ;
+		}		
+		.yz{
+			left:0px;
 		}
 	}
-	.computedgs .cgs_top .r_content{
-		margin-left: 0px !important;
-	}
-}
+}

+ 1 - 0
src/index.js

@@ -3,6 +3,7 @@ require('./css/reset.css');
 require('./css/popup.css');
 require('./js/popup');
 const $ = require("jquery");
+
 const { post,config,getUrlArgObject } = require('./js/promise.js');
 
 const {bqtsFun,ybzlFun,cyywFun,knzdFun,jtFun,tjwzFun,tjtgFun,tjhyFun,tjfjFun,yszdFun} = require('./js/indexDom.js');

+ 9 - 1
src/js/staticInfo.js

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