Mask pop-up window

Source: Internet
Author: User

The mask here is a bit problematic. The height is not all masked, and the width is not all masked when the browser screen is reduced.

<Style> body {margin: 0;}/* body <HTML <document */body, HTML {Height: 100%;}/* compatible with earlier ie versions, to set the body and HTML to 100% */. floats {position: absolute; top: 0; left: 0; width: 100%; Height: 100%; Background: #000; opacity: 0.5; filter: alpha (opacity = 50 );}. alert {width: 400px; Height: 200px; Background: # FFF; Border: 2px solid yellow; position: absolute; top: 50%; left: 50%; margin-top:-102px; margin-left:-202px;}/* If margin-top and margin-left are not added, they are not centered. To add these two attributes, the top value is half of its height, and left is half of its width, because the border is added, two pixels are added. * // * standard opacity: 0 ~ 1; ie private filter: alpha (opacity = 0 ~ 100 ); */</style> 

 

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.