Home  >  Article  >  Backend Development  >  Solving the problem of control occlusion: About windowed elements and windowless elements_PHP tutorial

Solving the problem of control occlusion: About windowed elements and windowless elements_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 15:57:50927browse

I don’t know if my friends have ever 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), and before IE5.01 IFRAMEs


Windowless elements include:
Windowless ActiveX controls, IFRAMEs after IE5.5, most DHTML elements


Which are worth mentioning What I’m talking about is ActiveX controls. By default, VB and MFC controls have windows, and ATL controls are windowless. However, ActiveX controls are implemented as windowless and are actually classified into 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 Drawing is displayed on different planes. 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 The z-index is 8, and then adjust the z-index of SELECT to 7 (it only needs to be smaller than the z-index of DIV).

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/317755.htmlTechArticleI 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 set this directly...
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