Summary of some knowledge and skills for creating a page mask in javascript page 1/3 _ javascript skills

Source: Internet
Author: User
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}

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.