Summary of some knowledge and skills for creating page masks in javascript today's popular ajax, simulating pop-up windows, thinkbox, greybox, and many other special effects all use the masked functions, its application is also very simple for us: create an absolute positioning, the top/left values are 0, the width and height are equal to the width of the browser content, and then the index setting is larger. However, there are some problems and skills that you may not know or are not clear about. here we will summarize some points that are found during the personal learning process.
1. if you want to disable operations on the lower part of the mask, you must set the background attribute and a valid value. otherwise, although the mask layer is successfully created, however, you can still operate on the elements in the lower part of the page.
2. if you want to display the elements at the bottom of the page, you can set the transparency through css, for example, filter: alpha (opacity = 0). here it is completely transparent, and you can also set it to translucent.
3. the blocks formed by layer p can mask iframe, but cannot cover select and object.
4. iframe can be used to cover the select statement. generally, iframe and p are used to cover the select statement (p is higher than the z index of iframe) and create the content, in fact, iframe will automatically hide the select statement, or you can only use p and js to hide the select statement.
5. most of the methods for hiding select using js are used when creating a real mask, such as a pop-up box or thinkbox. Iframe and p are mainly used for partial masks. for example, when the date control or title is displayed, iframe and p are positioned at the same position to cover the select control.
The following is a summary of the above Demos:
(1) do not set the p mask of the background attribute. {The elements behind the board can still be operated after they appear}