I don't know if my friends have ever encountered the control occlusion problem. The most typical issue is DropdownList and ActiveX occlusion. The z-index of HTML is used to solve this problem, but it is not feasible to directly set this attribute, this involves the problem of window elements and window elements.
Window elements include the following types:
<Object>, ActiveX control, Plug-ins, DHTML Scriptlets, SELECT elements (HTML representation of DropdownList), IFRAMEs before IE5.01
Windowless elements include:
Windowless ActiveX controls, IFRAMEs after IE5.5, and most DHTML Elements
Among them, ActiveX controls are worth mentioning. By default, VB and MFC controls have windows, while ATL controls do not, however, ActiveX controls are implemented as windowless elements and are actually classified into windowless elements.
No matter how the container is set, all window elements will appear on the element without a window, and the elements with and without a window will follow the z-index attribute, they will be drawn on different planes for display. Setting z-index can only work on the plane where they are located, and the plane with window elements is always above the plane without window elements.
The idea of solving the occlusion problem is very simple. We encapsulate our elements into a DIV, and the code example is as follows:
<DIV id = "PAL2" style = "DISPLAY: inline; Z-INDEX: 8; LEFT: 80px; WIDTH: 360px; POSITION: absolute; TOP: 80px; HEIGHT: 168px">
<OBJECT id = "dhtmltest" style = "Z-INDEX: 8; WIDTH: 352px; HEIGHT: 168px" type = "text/x-scriptlet" data = "TestDivDropdownList.htm" VIEWASTEXT>
</OBJECT> </DIV>
DIV's z-index is 8, and then the SELECT z-index is adjusted to 7 (only smaller than DIV's z-index ).