首页 > 代码库 > Bootstrap 模态窗口的应用
Bootstrap 模态窗口的应用
Bootstrap中文站那里的资料有些难以理解,也顺便当个笔记写下来。
data-target中表示需要唤醒的modal的类,其他就很简单了
<button class="btn btn-primary" data-toggle="modal" data-target=".modal">Small modal</button>
<!-- Modal -->
<div class="modalfade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">
<span aria-hidden="true">×</span><span class="sr-only">Close</span>
</button>
<h4 class="modal-title" id="myModalLabel">SysInfo</h4>
</div>
<div class="modal-body">...</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
Bootstrap 模态窗口的应用