مودال
<div class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">عنوان مودال</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p>محتوای مودال در این قسمت قرار میگیرد.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">بستن</button>
<button type="button" class="btn btn-primary">اعمال تغییرات</button>
</div>
</div>
</div>
</div>
دمو
<button type="button" class="btn btn-primary mr-2 mb-2" data-toggle="modal" data-target="#exampleModal">
اجرای مودال
</button>
<div class="modal" tabindex="-1" role="dialog" id="exampleModal">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">عنوان مودال</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p>محتوای مودال در این قسمت قرار میگیرد.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">بستن</button>
<button type="button" class="btn btn-primary">اعمال تغییرات</button>
</div>
</div>
</div>
</div>
همراه اسکرول
<div class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">عنوان مودال</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">بستن</button>
<button type="button" class="btn btn-primary">اعمال تغییرات</button>
</div>
</div>
</div>
</div>
قرارگیری از وسط
<div class="modal fade" id="exampleModalCenter" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalCenterTitle">عنوان مودال</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<i class="ti-close"></i>
</button>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">بستن
</button>
<button type="button" class="btn btn-primary">اعمال تغییرات</button>
</div>
</div>
</div>
</div>
سایزها
<!-- .modal-xl -->
<div class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-header">
<h6 class="modal-title">مودال خیلی بزرگ</h6>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<i class="ti-close"></i>
</button>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">بستن
</button>
<button type="button" class="btn btn-primary">اعمال تغییرات</button>
</div>
</div>
</div>
</div>
<!-- .modal-lg -->
<div class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h6 class="modal-title">مودال بزرگ</h6>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<i class="ti-close"></i>
</button>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">بستن
</button>
<button type="button" class="btn btn-primary">اعمال تغییرات</button>
</div>
</div>
</div>
</div>
<!-- .modal-sm -->
<div class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<h6 class="modal-title">مودال کوچک</h6>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<i class="ti-close"></i>
</button>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">بستن
</button>
<button type="button" class="btn btn-primary">اعمال تغییرات</button>
</div>
</div>
</div>
</div>
مودال متفاوت
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" data-whatever="@mdo">
مودال برای @mdo
</button>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" data-whatever="@fat">
مودال برای @fat
</button>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" data-whatever="@getbootstrap">مودال برای
@getbootstrap
</button>
<!-- modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">پیام جدید</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<i class="ti-close"></i>
</button>
</div>
<div class="modal-body">
<form>
<div class="form-group">
<label for="recipient-name" class="col-form-label">دریافت کنندگان</label>
<input type="text" class="form-control" id="recipient-name">
</div>
<div class="form-group">
<label for="message-text" class="col-form-label">پیام:</label>
<textarea class="form-control" id="message-text"></textarea>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">بستن
</button>
<button type="button" class="btn btn-primary">ارسال</button>
</div>
</div>
</div>
</div>