以下是一个测试的静态html,为bug重现及及解决方法。
view sourceprint?01 <!doctype html>
02 <html>
03 <head>
04 <meta charset="utf-8">
05 <title>insert title here</title>
06<style type="text/css教程">
07#d1,#d2 {
08width:400px;
09height : 400px;
10}
11#d1 {
12position : absolute;
13top : 100px;
14background : red;
15z-index : 1;
16}
17#d2 {
18position : absolute;
19top : 150px;
20background : blue;
21z-index : 2;
22}
23</style>
24 </head>
25 <body>
26<div id="d1">
27<form>
28<input type="text" name="username"/>
29</form>
30<p>中</p>
31<form>
32<iframe style="z-index:1"><!-- 用iframe 解决此bug -->
33<select name="country">
34<option value="1">china</option>
35<option value="2">japanese</option>
36<option value="1">u.s.a</option>
37</select>
38</iframe>
39</form>
40</div>
41<div id="d2">ddd</div>
42 </body>
43 </html>