UNPKG

bootstrap-modal-backdrop

Version:

Backdrop options for a responsive popup with Bootstrap 5. Prevent close on click outside with static backdrop, remove backdrop, enable interactivity & more.

57 lines (52 loc) 2.19 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> <meta http-equiv="x-ua-compatible" content="ie=edge" /> <title>Material Design for Bootstrap</title> <!-- MDB icon --> <link rel="icon" href="img/mdb-favicon.ico" type="image/x-icon" /> <!-- Font Awesome --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" /> <!-- Google Fonts Roboto --> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap" /> <!-- MDB --> <link rel="stylesheet" href="css/bootstrap-modal-backdrop.min.css" /> </head> <body> <!-- Start your project here--> <div class="container"> <div class="d-flex justify-content-center align-items-center" style="height: 100vh"> <!-- Button trigger modal --> <button type="button" class="btn btn-primary" data-mdb-toggle="modal" data-mdb-target="#exampleModal2"> Launch demo modal </button> <!-- Modal --> <div class="modal top fade" id="exampleModal2" tabindex="-1" aria-labelledby="exampleModal2Label" aria-hidden="true" data-mdb-backdrop="static" data-mdb-keyboard="true"> <div class="modal-dialog "> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModal2Label">Modal title</h5> <button type="button" class="btn-close" data-mdb-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body">...</div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-mdb-dismiss="modal"> Close </button> <button type="button" class="btn btn-primary">Save changes</button> </div> </div> </div> </div> </div> </div> <!-- End your project here--> <!-- MDB --> <script type="text/javascript" src="js/mdb.min.js"></script> <!-- Custom scripts --> <script type="text/javascript"></script> </body> </html>