Pop-up window effect is too common, a site will often have multiple pop-up windows, and the style is not exactly the same, this time you can write a function, the whole station unified call. Name the general class and the class of the individual style, the center of the pop-up display principle is very simple, set its positioning fixed,top:50% and left:50%, and then use JS to get the width and height of the window, and then set its top and left margin respectively, divided by 2 and the height divided by 2. The overall effect is very good and is not affected by the height of the page.
The specific code is clear: http://pan.baidu.com/s/1i5sBJDj
Style is simple, no landscaping ah haha, front-end personnel only see the code does not need to beautify it!
You can also add a draggable effect to the pop-up window, the code is not difficult, adding it yourself, so the experience is better.
"Effects" pop-up effect (multiple pages can be called uniformly, with a matte background)