• IE6下弹出div覆盖select下拉框


    第一次在这写总结:以前都在百度上写,总感觉自己太菜,不敢在这写,但是想想写了大家不给提议建进步是很慢的,以后就在这写吧!

    解决办法: 以iframe作为div的子元素,用iframe去掩盖select元素。让iframe同div高宽一样,并z-index要比div低!

    例如:

    //这是select得位置,在table里的begin

    View Code
    1 <table border="0" cellspacing="0" cellpadding="0" id="biaoge_1">
    2 <tr>
    3 <td width="35%" align="right" class="STYLE1">
    4 所属省份:
    5 </td>
    6 <td colspan="5">
    7 <asp:DropDownList ID="ddlProvince" AppendDataBoundItems="true" CssClass="province"
    8 runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlProvince_SelectedIndexChanged">
    9 </asp:DropDownList>
    10 <span class="STYLE1">手机类型: </span> <span class="STYLE2">联通固话-河南</span>
    11 <div id="proviTip"></div>
    12 </td>
    13 </tr>
    14
    15  </table>
    16
    17 //end结束s
    18
    19 <div id="divmsg" class="box">
    20
    21 <iframe class="iframe_Y"></iframe>
    22
    23 //begin 这是要弹出的提示层
    24
    25 <div style="font-size: 15px; 100%; height: 57px;">
    26 <table width="100%">
    27 <tr>
    28 <td height="10px;">
    29 </td>
    30 </tr>
    31 <tr>
    32 <td>
    33 <span style="left: 10px;" id="submintMsg"></span>
    34 </td>
    35 </tr>
    36 </table>
    37
    38 </div>
    39
    40 <div id="btns" class="box2">
    41 <table width="100%" border="0px;">
    42 <tr>
    43 <td>
    44 </td>
    45 <td align="center">
    46 <input type="button" name="btnSubmit" id="btnPutIn" value="确定" />
    47 </td>
    48 <td align="center">
    49 <input type="button" name="btnCancel" id="btnCancel" value="取消" />
    50 </td>
    51 <td>
    52 </td>
    53 </tr>
    54 </table>
    55 </div>
    56
    57 //end确定取消按钮
    58
    59 .box{z-index:100;border: 2px #d5d5d5 solid; 400px;height: 100px;font-size: 13px; color: #4F4AF2}
    60
    61 .iframe{
    62
    63 position:absolute; //绝对定位保证iframe不会占用流布局空间
    64
    65 100%; /*100%保证可以覆盖整个div*/
    66
    67 height: 100%;
    68
    69 z-index:-1; /*-1保证iframe显示在div下方*/
    70
    71 background-color:Whiter;
    72
    73 border:0px;
    74
    75 }
  • 相关阅读:
    Tornado 和 Gin 框架性能实测
    测试基础
    计算机基础
    跨域和CORS
    Django之Form和ModelForm组件
    Django之锁和事务,中间件
    Django之Ajax
    Django基础之ORM多表操作
    Django基础之cookie和session
    Django基础之ORM单表操作
  • 原文地址:https://www.cnblogs.com/huicao/p/2017593.html
Copyright © 2020-2023  润新知