Home  >  Article  >  Backend Development  >  Problem Children All Come from Another World Season 2 Solve the control occlusion problem: About elements with windows and elements without windows

Problem Children All Come from Another World Season 2 Solve the control occlusion problem: About elements with windows and elements without windows

WBOY
WBOYOriginal
2016-07-29 08:36:121084browse

I don’t know if my friends have encountered the occlusion problem of controls. The most typical ones are the occlusion of DropdownList and ActiveX. HTML’s z-index is used to deal with this problem, but setting this attribute directly is not enough because it involves There are issues with windowed elements and windowless elements.
There are probably the following types of window elements:
, ActiveX controls, Plug-ins, DHTML Scriptlets, SELECT elements (that is, the HTML representation of DropdownList), IFRAMEs before IE5.01
Windowless elements include:
None Windowed ActiveX controls, IFRAMEs after IE5.5, and most DHTML elements
Among them, it is worth mentioning that ActiveX controls. By default, VB and MFC controls have windows, and ATL controls have no windows, but ActiveX controls are implemented as windowless and are actually classified as windowless elements.
No matter how the container is set, all windowed elements will appear on top of windowless elements. Windowed elements and windowless elements will follow the z-index attribute of each other internally, and they will be drawn on different planes for display. , setting z-index can only affect the plane where they are located, and the plane with window elements is always above the plane of non-window elements.
Then the idea to solve the occlusion problem is very simple. Encapsulate our elements into a DIV. The code example is as follows:



DIV’s z-index is 8, and then adjust the SELECT’s z-index to 7 (just compare DIV's z-index is small).

The above introduces how to solve the problem of control occlusion in Problem Children All Come From Another World Season 2: About windowed elements and windowless elements, including the content of Problem Children All Come From Another World Season 2. I hope that friends are interested in PHP tutorials. Helps.

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