Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the bug that select can not be covered by div in ie6

2025-02-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly introduces how to solve the ie6 select can not be covered by div bug, the article is very detailed, has a certain reference value, interested friends must read it!

Use div to make masks or simulate pop-up windows, but under IE6, when there is a drop-down list box select element below div, the drop-down list box will scratch div and display on top of div. This problem will occur no matter what the value of z-index is set. The Z axis may be out of control due to the pop-up list of the drop-down list control. But IE6 has a magic logic, div can't cover select, but iframe can cover select, and div can overwrite iframe, so the solution is to wrap or cover the drop-down list box control with a higher Z-axis height of the Iframe element to bring it back to the normal Z-axis height!

Html is as follows:

Html code

The code is as follows:

Here is a lot of code, [url=www.k686.com] www.k686.com [/ url]

The code is as follows:

Here is a lot of code, [url=www.k686.com] www.k686.com [/ url]

The css code is as follows:

Html 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 bug can be solved.

The z-index of iframe must be set to a negative number, otherwise it will not be covered.

The above is all the contents of this article entitled "how to solve the bug in which select cannot be covered by div in ie6". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report