作者 乔爽

update

@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <html lang="en"> 2 <html lang="en">
3 <head> 3 <head>
4 <meta charset="UTF-8"> 4 <meta charset="UTF-8">
5 - <title>登记</title> 5 + <title>登记</title>
6 <!--<meta name="viewport" content="width=device-width, initial-scale=1" />--> 6 <!--<meta name="viewport" content="width=device-width, initial-scale=1" />-->
7 <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" /> 7 <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
8 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 8 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
@@ -25,6 +25,9 @@ @@ -25,6 +25,9 @@
25 .bottom{ 25 .bottom{
26 width: 100%; 26 width: 100%;
27 } 27 }
  28 + .mid{
  29 + font-size: 0.24rem;
  30 + }
28 </style> 31 </style>
29 </head> 32 </head>
30 <body> 33 <body>
@@ -63,46 +66,59 @@ @@ -63,46 +66,59 @@
63 </div> 66 </div>
64 <!--右边--> 67 <!--右边-->
65 <div class="mid_item_right contact"> 68 <div class="mid_item_right contact">
66 - <p class="contact_way">  
67 - <span> 69 + <div class="contact_way">
  70 + <p>
68 您的姓名<span class="color_red">*</span> 71 您的姓名<span class="color_red">*</span>
69 - </span>  
70 - <input class="contact_way_input" type="text" >  
71 - </p>  
72 - <p class="contact_way">  
73 - <span> 72 + </p>
  73 + <div class="contact_box">
  74 + <input class="contact_way_input" type="text" >
  75 + </div>
  76 +
  77 + </div>
  78 + <div class="contact_way">
  79 + <p>
74 您的职务<span class="color_red">*</span> 80 您的职务<span class="color_red">*</span>
75 - </span>  
76 - <input class="contact_way_input" type="text" >  
77 - </p>  
78 - <p class="contact_way">  
79 - <span> 81 + </p>
  82 + <div class="contact_box">
  83 + <input class="contact_way_input" type="text" >
  84 + </div>
  85 + </div>
  86 + <div class="contact_way">
  87 + <p>
80 办公电话 88 办公电话
81 - </span>  
82 - <input class="contact_way_input" type="text" >  
83 - </p>  
84 - <p class="contact_way">  
85 - <span> 89 + </p>
  90 + <div class="contact_box">
  91 + <input class="contact_way_input" type="text" >
  92 + </div>
  93 + </div>
  94 + <div class="contact_way">
  95 + <p>
86 联系QQ 96 联系QQ
87 - </span>  
88 - <input class="contact_way_input" type="text" >  
89 - </p>  
90 - <p class="contact_way">  
91 - <span> 97 + </p>
  98 + <div class="contact_box">
  99 + <input class="contact_way_input" type="text" >
  100 + </div>
  101 + </div>
  102 + <div class="contact_way">
  103 + <p>
92 手机号<span class="color_red">*</span> 104 手机号<span class="color_red">*</span>
93 - </span>  
94 - <input class="contact_way_input" type="text" >  
95 - </p>  
96 - <p class="contact_way">  
97 - <span> 105 + </p>
  106 + <div class="contact_box">
  107 + <input class="contact_way_input" type="text" >
  108 + </div>
  109 + </div>
  110 + <div class="contact_way">
  111 + <p>
98 公司名称<span class="color_red">*</span> 112 公司名称<span class="color_red">*</span>
99 - </span>  
100 - <input class="contact_way_input" type="text" >  
101 - </p> 113 + </p>
  114 + <div class="contact_box">
  115 + <input class="contact_way_input" type="text" >
  116 + </div>
  117 + </div>
102 <div class="contact_way"> 118 <div class="contact_way">
103 - <span> 119 + <p>
104 公司地址<span class="color_red">*</span> 120 公司地址<span class="color_red">*</span>
105 - </span> 121 + </p>
106 <!--三级联动样式设置--> 122 <!--三级联动样式设置-->
107 <div data-toggle="distpicker"> 123 <div data-toggle="distpicker">
108 <div class="contact_way_select"> 124 <div class="contact_way_select">
@@ -128,12 +144,14 @@ @@ -128,12 +144,14 @@
128 </div> 144 </div>
129 </div> 145 </div>
130 </div> 146 </div>
131 - <p class="contact_way">  
132 - <span> 147 + <div class="contact_way">
  148 + <p>
133 详细地址<span class="color_red">*</span> 149 详细地址<span class="color_red">*</span>
134 - </span>  
135 - <input class="contact_way_input" type="text" >  
136 - </p> 150 + </p>
  151 + <div class="contact_box">
  152 + <input class="contact_way_input" type="text" >
  153 + </div>
  154 + </div>
137 155
138 156
139 </div> 157 </div>
@@ -425,6 +443,26 @@ @@ -425,6 +443,26 @@
425 <script src="js/distpicker.js"></script> 443 <script src="js/distpicker.js"></script>
426 444
427 <script> 445 <script>
  446 + $("input").blur(function(){
  447 + setTimeout(function() {
  448 + var scrollHeight = document.documentElement.scrollTop || document.body.scrollTop || 0;
  449 + window.scrollTo(0, Math.max(scrollHeight - 1, 0));
  450 + }, 300);
  451 + })
  452 + //聚焦监听
  453 + $('input').focus(function() {
  454 + if((/Android/gi).test(navigator.userAgent)) {
  455 + window.addEventListener('resize', function() {
  456 + if(document.activeElement.tagName == 'INPUT' ||
  457 + document.activeElement.tagName == 'TEXTAREA') {
  458 + window.setTimeout(function() {
  459 + document.activeElement.scrollIntoViewIfNeeded();
  460 + }, 0);
  461 + }
  462 + });
  463 + }
  464 + })
  465 +
428 //底部四个按钮 466 //底部四个按钮
429 $('.index').click(function () { 467 $('.index').click(function () {
430 window.location.href = "index.html" 468 window.location.href = "index.html"
@@ -82,7 +82,7 @@ input{ @@ -82,7 +82,7 @@ input{
82 width: 5.1rem; 82 width: 5.1rem;
83 } 83 }
84 .mid_item_right input{ 84 .mid_item_right input{
85 - border-bottom: 1px solid #959595; 85 + /*border-bottom: 1px solid #959595;*/
86 background: transparent; 86 background: transparent;
87 } 87 }
88 /*展位要求*/ 88 /*展位要求*/
@@ -177,7 +177,7 @@ input{ @@ -177,7 +177,7 @@ input{
177 margin-top: 0; 177 margin-top: 0;
178 } 178 }
179 .contact_way input{ 179 .contact_way input{
180 - 180 + width: 3.5rem;
181 } 181 }
182 /*公司地址*/ 182 /*公司地址*/
183 .contact_way_select{ 183 .contact_way_select{
@@ -221,3 +221,7 @@ input{ @@ -221,3 +221,7 @@ input{
221 font-size: 0.24rem; 221 font-size: 0.24rem;
222 color: #666666; 222 color: #666666;
223 } 223 }
  224 +
  225 +.contact_box{
  226 + border-bottom: 1px solid #959595;
  227 +}
@@ -22,6 +22,9 @@ @@ -22,6 +22,9 @@
22 color: #959595; 22 color: #959595;
23 font-size: 0.5rem; 23 font-size: 0.5rem;
24 } 24 }
  25 + .mid_item{
  26 + font-size: 0.24rem;
  27 + }
25 </style> 28 </style>
26 </head> 29 </head>
27 <body> 30 <body>
@@ -310,6 +313,26 @@ @@ -310,6 +313,26 @@
310 313
311 <script src="js/jquery.min.js"></script> 314 <script src="js/jquery.min.js"></script>
312 <script> 315 <script>
  316 + $("input").blur(function(){
  317 + setTimeout(function() {
  318 + var scrollHeight = document.documentElement.scrollTop || document.body.scrollTop || 0;
  319 + window.scrollTo(0, Math.max(scrollHeight - 1, 0));
  320 + }, 300);
  321 + })
  322 + //聚焦监听
  323 + $('input').focus(function() {
  324 + if((/Android/gi).test(navigator.userAgent)) {
  325 + window.addEventListener('resize', function() {
  326 + if(document.activeElement.tagName == 'INPUT' ||
  327 + document.activeElement.tagName == 'TEXTAREA') {
  328 + window.setTimeout(function() {
  329 + document.activeElement.scrollIntoViewIfNeeded();
  330 + }, 0);
  331 + }
  332 + });
  333 + }
  334 + })
  335 +
313 //底部四个按钮 336 //底部四个按钮
314 $('.index').click(function () { 337 $('.index').click(function () {
315 window.location.href = "index.html" 338 window.location.href = "index.html"