Use div to create a mask or simulate a pop-up window. However, in IE6, when there is a drop-down list box select element under the div, the drop-down list box will break through the div and be displayed on the div. This problem will occur regardless of the z-index value. The problem may be due to the pop-up drop-down list of the drop-down list control, which causes the Z-axis height to be out of control. But IE6 has a magical logic, div cannot cover select, but iframe can cover select, and div can cover iframe, so the solution is to use an Iframe element with a higher Z-axis height to wrap or cover the drop-down list box control to return it to its normal Z-axis height! The html is as follows: Html code Copy code The code is as follows:<div id="acontainnerbox" class="aboxinitcss"> Here are a lot of codes, <iframe class="ifhideselect" frameborder="0"></iframe> </div> Copy code The code is as follows:<div id="acontainnerbox" class="aboxinitcss"> Here are a lot of codes, <iframe class="ifhideselect" frameborder="0"></iframe> </div> The css code is as follows: Html code Copy code The code is as follows:.aboxinitcss{ position:absolute; margin-top:0px; margin-left:0px; display:none; background:#FFF; border:solid #CCC 1px; padding:30px; z-index:9999; width:620px;overflow:hidden; } .ifhideselect{ z-index:-1; width:680px; height:255px; position:absolute; border:0; left:0; top:0; } .aboxinitcss{ position:absolute; margin-top:0px; margin-left:0px; display:none; background:#FFF; border:solid #CCC 1px; padding:30px; z-index:9999; width:620px;overflow:hidden; } .ifhideselect{ z-index:-1; width:680px; height:255px; position:absolute; border:0; left:0; top:0; } This will solve this bug. The z-index of the iframe must be set to a negative number, otherwise it will not be covered. |
<<: Specific use of stacking context in CSS
>>: An article to give you a deep understanding of Mysql triggers
Some time ago, I submitted a product version to t...
Docker has many log plug-ins. The default is to u...
Project Documentation Directory Div+CSS Naming Sta...
Table of contents need Core Idea Two ways to impl...
We have introduced how to create a waterfall layo...
HTML meta viewport attribute description What is ...
Table of contents 1. Component bloat 2. Change th...
Use JS to zoom in and out when the mouse is on th...
01 Winter Flakes (Individual only) 02 Snowtop Cap...
This article shares the specific code of JavaScri...
The first parameter passing method is dynamic rou...
CSS realizes the process navigation effect. The s...
This article example shares the specific code of ...
Assume there are two Linux servers A and B, and w...
Compared with other large databases such as Oracl...