In the process of the project, there are C + + control, hierarchy problem solving

Source: Internet
Author: User
Tags visibility

The first thing to understand is that the hierarchy of the same class can be controlled by Z-index, but not in the hierarchy between the same class:

C + + control >div;

However, in the use of the process, how to reasonably control the relationship between the various.

If I have ever encountered a problem ; the control is placed in a pop-up box, but when 2 pop-up boxes are open and move with each other, a pop-up box is placed over another pop-up box, and the problem comes. The above pop-up box can cover the bottom of the pop-up box head, which can only block the head of the Div, can not cover the content of the control. Why there is such a situation; Originally our pop-up box can be based on the pop-up order, there is a hierarchical order, but the control between the hierarchy is also based on the pop-up order, different when the first pop-up level higher. This leads to the phenomenon of the following diagram


So the question, how to solve it.

Method: Let's introduce an IFRAME first. Because the Irame hierarchy is higher than the C + + control, that is, the iframe>c++ control, the control >div; but the DIV can block the IFRAME. Let's wrap the control through the IFRAME and it's OK.

The second problem encountered, the page is mainly C + + control, but occasionally need a pop-up box. Control keeps the pop-up box from blocking. What to do.

Workaround:

Visibility:hidden the control when you execute the pop-up box (remember that you can't use display:none show and hide; because when you pop the box off, you load the control two times, it's definitely not going to work).

And through the form of callback function to write pop-up box, that is, the JS process blocking process, only when the button is clicked, then the C + + control visibility:visible

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.