Simple Model Popup Box using HTML CSS and JavaScript

Today, We want to share with you Simple Model Popup Box using HTML CSS and JavaScript.In this post we will show you javascript popup window onclick example, hear for html code for popup window on page load we will give you demo and example for implement.In this post, we will learn about A Very Simple Popup Box – HTML, CSS, JavaScript with an example.

Simple Model Popup Box using HTML CSS and JavaScript

There are the Following The simple About Simple Popup or Model Box Using HTML CSS and JavaScript Full Information With Example and source code.

As I will cover this Post with live Working example to develop how to create popup in html with css, so the How To Create a Modal Popup Box with CSS and JavaScript? is used for this example is following below.

The HTML Code

index.html

Click here to show the Model Popup
×
Add any Angularjs Vuejs or any tags for HTML Data content inside the Model popup box!

The CSS Code

Pure added CSS

.backg_smooth_scrol{
background:rgba(0,0,0,.4);
cursor:pointer;
display:none;
height:100%;
position:fixed;
text-align:center;
top:0;
width:100%;
z-index:10000;
}
.backg_smooth_scrol .helper{
display:inline-block;
height:100%;
vertical-align:middle;
}
.backg_smooth_scrol > div {
background-color: #fff;
box-shadow: 10px 10px 60px #555;
display: inline-block;
height: auto;
max-width: 551px;
min-height: 100px;
vertical-align: middle;
width: 60%;
position: relative;
border-radius: 8px;
padding: 15px 5%;
}
.removeHideBtnModel {
background-color: #fff;
border: 3px solid #999;
border-radius: 50px;
cursor: pointer;
display: inline-block;
font-family: arial;
font-weight: bold;
position: absolute;
top: -20px;
right: -20px;
font-size: 25px;
line-height: 30px;
width: 30px;
height: 30px;
text-align: center;
}
.removeHideBtnModel:hover {
background-color: #ccc;
}
.alert_model_popup_click {
cursor: pointer;
font-size: 20px;
margin: 20px;
display: inline-block;
font-weight: bold;
}

The Script

using jquery Example

$(window).load(function () {
$(".alert_model_popup_click").click(function(){
$('.backg_smooth_scrol').show();
});
$('.backg_smooth_scrol').click(function(){
$('.backg_smooth_scrol').hide();
});
$('.removeHideBtnModel').click(function(){
$('.backg_smooth_scrol').hide();
});
});
Web Programming Tutorials Example with Demo

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about javascript popup window onclick.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Leave a Comment