我對Bootstrap和一般的網頁設計相當陌生。 我只是不明白爲什麼Bootstrap中的某些東西不起作用! 我目前正在嘗試使用模態。Bootstrap - 莫代爾不工作?
觸發:
<a data-toggle="modal" href="#myModal" class="btn btn-primary btn-lg">Launch demo modal</a>
模態:
<div class="modal fade" 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" aria-hidden="true">×</button>
<h4 class="modal-title">Modal title</h4>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
我試着做我自己的模態,它不會工作,所以我甚至只是拉驗證碼關閉堆棧溢出文章,它似乎不適用於我。
爲什麼它不工作?
腳本:
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="js/init.js"></script>
添加了它 - 它仍然不起作用。 – user3102516
現有代碼的小提琴將有所幫助。如果您使用的是Bootstrap 3,而不是2.3.2,並且按照他們網站上的設置說明進行操作,您應該可以毫無問題地使用該模式! – mumush