<div>
<button id="btn-review" data-target="#reviewModal" data-toggle="modal">Create your own review</button>
</div><!--注意data-target,data-toggle这两个属性-->
<!--modal-->
<div class=" modal fade" id="reviewModal" role="dialog" tabindex="-1" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog" style="">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×
</button>
</div>
<div class = "modal_main">
main code.......(button ,text ,form)
<form role="form" method="POST" action=" " id="review-modal-form">
<!--ratings modal-->
<input type="hidden" name="terrain_id" id="terrain_id">
</form>
</div><!--end modal_main-->
</div><!--end modal-header-->
</div><!--end modal-content-->
</div><!--end modal-dialog-->
</div><!--end modal-->
bootstrap modal使用
原文作者:Amyding929
原文地址: https://segmentfault.com/a/1190000000455548
本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
原文地址: https://segmentfault.com/a/1190000000455548
本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。