我对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