Home > Web Front-end > JS Tutorial > js CSS method to pop up a semi-transparent div layer with a centered background_javascript skills

js CSS method to pop up a semi-transparent div layer with a centered background_javascript skills

WBOY
Release: 2016-05-16 16:12:46
Original
1374 people have browsed it

The example in this article describes the method of popping up a semi-transparent div layer with a centered background using js CSS. Share it with everyone for your reference. The specific implementation method is as follows:

Copy code The code is as follows:




js CSS pop-up centered background semi-transparent div layer






CSS pop-up layer, or pop-up window, a pop-up box with a translucent background,
is very suitable for use in website login, user registration, and announcement prompts.
It can be used in IE, FF and OP~pop-up window, the background is semi-transparent

Principle: Two layers, one with a height and width of 100%, and the other with the specific content of the window you want to pop up.
In IE, translucency uses filter: Alpha(opacity=60); in non-transparent Use opacity:0.60 in IE;


  Click here to open the window

Two layers, one with a height and width of 100%, and the other with the specific content of the window you want to pop up. For translucency, use filter: Alpha(opacity=60) in IE. ;Use opacity:0.60 in non-IE;






Click to close the window


I hope this article will be helpful to everyone’s JavaScript programming design.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template