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:
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.