Home >Web Front-end >JS Tutorial >js mouse slides over the pop-up layer positioning IE6 bug solution_javascript skills

js mouse slides over the pop-up layer positioning IE6 bug solution_javascript skills

WBOY
WBOYOriginal
2016-05-16 17:45:261150browse

People often use pop-up layers when writing div css. Due to a bug in IE6, when multiple tags are used to repeatedly write pop-up layers, the subsequent layers will be laminated on top of the pop-up layer. This problem occurs in Firefox. You can use z-index to solve it in the browser, but it doesn't work in IE6. The following code provides you with a solution to this kind of problem. The principle is as follows: Use Jquery to increase the z-axis of the pop-up layer in sequence. Highly. The code is very simple and the effect is very significant. Hoho!

Copy code The code is as follows:

.org/1999/xhtml">


Solution to pop-up layer problem










The above JS code needs to introduce jquery-1.3.2.min.js File
Key JS code
for(var i = 0; i < $(".box li").length;i ){
var j = 10000-i
$(". box li").eq(i).css("z-index",j);
}

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn