Bootstrap Modal

 

Modal is a plugin popup window which is shown on the top of current page.Here small modal having .modal-sm class, large modal having .modal-lg class and medium modal having .modal-md class.In this example modals are opened with data-target attribute.

 
 
 
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Bootstrap Input Example</title> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> </head> <body> <div class="row"> <button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#largeModal">Open Large Modal</button>&nbsp; <button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#mediumModal">Open Medium Modal</button>&nbsp; <button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#smallModal">Open Small Modal</button> </div> <!-- Large Modal --> <div id="largeModal" class="modal fade" role="dialog"> <div class="modal-dialog modal-lg"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">&times;</button> <h4 class="modal-title">Header</h4> </div> <div class="modal-body"> <p>This is a example of large bootstrap modal opened with css. Thanks to visiting LearnKode.</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> </div> </div> </div> </div> <!-- Medium Modal --> <div id="mediumModal" class="modal fade" role="dialog"> <div class="modal-dialog modal-md"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">&times;</button> <h4 class="modal-title">Header</h4> </div> <div class="modal-body"> <p>This is a example of medium bootstrap modal opened with css.Thanks to visiting LearnKode.</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> </div> </div> </div> </div> <!-- Small Modal --> <div id="smallModal" class="modal fade" role="dialog"> <div class="modal-dialog modal-sm"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">&times;</button> <h4 class="modal-title">Header</h4> </div> <div class="modal-body"> <p>This is a example of small bootstrap<br /> modal opened with css.<br /> Thanks to visiting LearnKode.</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> </div> </div> </div> </div> </body> </html>
Output