Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Untitled Document</title>
- <style>.modal-container{
- position:fixed;
- background-color:#fff;
- border:solid 1px #ccc;
- left:50%;
- transform:translate(-50%, -200%);
- -webkit-transform:translate(-50%, -200%);
- -ms-transform:translate(-50%, -200%);
- padding:20px;
- width:70%;
- max-width:400px;
- transition:transform 700ms ease-out;
- -webkit-transition:transform 700ms ease-out;
- }
- .modal:before{
- content:"";
- background-color:rgba(0, 0, 0, 0.5);
- display:none;
- position:fixed;
- height:100%;
- left:0;
- top:0;
- width:100%;
- }
- .modal:target:before{
- display:block;
- }
- .modal:target .modal-container{
- transform:translate(-50%, 0);
- -webkit-transform:translate(-50%, 0);
- -ms-transform:translate(-50%, 0);
- }</style>
- </head>
- <body>
- <a href="#popup1" style='color:blue; font-size:16px;'>pop up 1</a>
- <a href="#popup2" style='color:blue; font-size:16px;'>pop up 2</a>
- <div class="modal" id="popup1">
- <div class="modal-container">
- This is our Pop up 1<br/>
- <a href="#">Close</a>
- </div>
- </div>
- <div class="modal" id="popup2">
- <div class="modal-container">
- This is our Pop up 2<br/>
- <a href="#">Close</a>
- </div>
- </div>
- </body>
- </html>
Add Comment
Please, Sign In to add comment