Popup Modal
How do I make an popup modal?
What is a popup modal? How do you make a popup modal? This script and codes were developed by Aaron Levine on 30 January 2023, Monday.
Popup Modal - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Popup Modal</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <meta content='width=device-width, height=device-height, minimum-scale=0.8, maximum-scale=0.8' name='viewport'>
<div class='modal-overlay show'> <div class='modal'> <div class='close'>✕</div> <div> <h3>This is a modal... enjoy : )</h3> <p>Yep... a modal</p> </div> </div>
</div>
<button class='show-modal'>Click me to show a modal</button> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/fastclick/1.0.2/fastclick.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Popup Modal - Script Codes CSS Codes
.modal-overlay { white-space: nowrap;
}
.modal-overlay:before { content: ''; display: inline-block; height: 100%; vertical-align: middle;
}
.modal-overlay > .modal { width: 100%; display: inline-block; vertical-align: middle; white-space: normal;
}
.modal-overlay { position: absolute; left: 0; top: 0; width: 100%; height: 100%; text-align: center; transition: all 0.5s, visibility 0 0.5s; background: transparent; visibility: hidden;
}
.modal-overlay.show { transition: all 0.5s, visibility 0 0; background: rgba(0, 0, 0, 0.2); visibility: visible;
}
.modal-overlay.show .modal { opacity: 1; -webkit-transform: scale(1, 1); -moz-transform: scale(1, 1); -ms-transform: scale(1, 1); -o-transform: scale(1, 1); transform: scale(1, 1);
}
.modal-overlay .modal { position: relative; display: inline-block; text-align: center; width: 50%; padding-top: 1.5rem; padding-bottom: 1.5rem; border-radius: 5px; box-shadow: 0 3px 10px -6px #333, 0 0 0.5px #666; background: #f9f9f9; color: #666; -webkit-transform: scale3d(0.1, 0.1, 0.1); -moz-transform: scale3d(0.1, 0.1, 0.1); -ms-transform: scale3d(0.1, 0.1, 0.1); -o-transform: scale3d(0.1, 0.1, 0.1); transform: scale3d(0.1, 0.1, 0.1); transition: all 0.25s cubic-bezier(0.38, 1.375, 0.63, 1.21); opacity: 0;
}
.modal-overlay .modal .close { content: '\2715'; display: inline-block; position: absolute; right: -0.75rem; top: -0.75rem; width: 2rem; height: 2rem; line-height: 2rem; border-radius: 50%; background: #CECECE; border: solid 2px #FFF; box-shadow: -1px 1px 5px -1px #666, 0 0 0.5px #666; font-size: 1.25rem; cursor: pointer;
}
button { padding: 1rem; font-weight: 800;
}
html, body { width: 100%; height: 100%; margin: 0; padding: 0; font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; background: #f9f9f9; font-weight: 800; color: #CCC;
}
Popup Modal - Script Codes JS Codes
$('.modal .close').on('click', function(){ $(this).closest('.modal-overlay').removeClass('show');
});
$('.show-modal').on('click', function(){ $('.modal-overlay').addClass('show');
});
//For Responsiveness
FastClick.attach(document.body);
Developer | Aaron Levine |
Username | Aldlevine |
Uploaded | January 30, 2023 |
Rating | 3 |
Size | 3,696 Kb |
Views | 6,072 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Card Mockup | 6,436 Kb |
Touch Hover | 2,764 Kb |
Flashy Rating Page | 4,375 Kb |
Blowout Menu | 4,712 Kb |
Custom Scroll with Momentum and Parallax | 8,441 Kb |
Popup Modal | 3,696 Kb |
JQuery.momentus | 5,092 Kb |
Kaskade 0.3 - Desktop Demo | 9,186 Kb |
Pure CSS Rating Scale | 2,706 Kb |
Random Gradients - JS | 2,026 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Slider css only | Armandobau | 2,161 Kb |
Awesome textarea | Ayoungh | 1,977 Kb |
Scrolling Horizontal Isotope | Bramus | 2,017 Kb |
Myprofile | SoufianeAbid | 2,451 Kb |
A Pen by Sooba | Sooba | 2,516 Kb |
SnappySnippet Test | Elmsoftware | 8,385 Kb |
Slides-07-1 POSITION | Exhtml | 1,909 Kb |
Cut and Paste Roll Link | BottomlineInteractive | 2,546 Kb |
Find The Penguin | Lelder | 2,212 Kb |
Pure CSS Tooltip | APinix | 2,815 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!