In addition to dynamic performance, the tutorials of the Helper House (www.bkjia.com) basically achieve the lightbox effect. There are many codes. I only post the core code. If you are interested in this, you can download the file I attached and study it carefully.
<! DOCTYPE html PUBLIC "-// W3C // dtd html 4.01 Transitional // EN">
Tip: the code can be modified before running!
Reference content is as follows: <Style> Img {border: none ;} . Black_overlay { Display: none; Position: absolute; Top: 0%; Left: 0%; Width: 100%; Height: 100%; Background-color: black; Z-index: 1001; -Moz-opacity: 0.8; Opacity:. 80; Filter: alpha (opacity = 80 ); } . White_content { Display: none; Position: absolute; Top: 25%; Left: 25%; Width: 603px; Height: 475px; Padding: 16px; Border: 16px solid # eee; Background-color: white; Z-index: 1002; Overflow: auto; } |
The mask layer is implemented using a transparent layer with full screen, and a little javascript is also used, which is very simple.