Use jquery to implement the Mask Layer

Source: Internet
Author: User

<Div style = "display: none" id = "yinying"> </div> <script type = "text/javascript"> function showUnitInfo () {var screenWidth = $ (window ). width (); // the current window width var screenHeight = $ (window ). height (); // the current window height $ ("# yinying" ).css ({"display": "", "position": "fixed", "background ": "#000", "z-index": "1001", "-moz-opacity": "0.5", "opacity ":". 50 "," filter ":" alpha (opacity = 50) "," width ": screenWidth," height ": screenHeight}) ;}</script>

 

Written by jquery. class libraries must be referenced before use. First, write a div that is not displayed. When an event is triggered, add a style to the div. The height is the current window height and the width is the current window width.

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.