0

我从引导站点有这个例子:

启动演示模式

<!-- Modal -->
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">Modal header</h3>
</div>
<div class="modal-body">
<p>One fine body…&lt;/p>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
<button class="btn btn-primary">Save changes</button>
</div>
</div>

在里面我有这一行:

<link href="<?php echo base_url();?>assets/bootstrap/dist/css/bootstrap.css" rel="stylesheet">

在标签结束之前,我放置了这两行:

<script src="<?php echo base_url();?>assets/bootstrap/assets/js/jquery.js"></script>
<script src="<?php echo base_url();?>assets/bootstrap/dist/js/bootstrap.min.js"></script>

它卡在打开模式视图上,它只是用黑色突出显示背景,没有任何显示:s,我做错了什么?任何想法?

4

1 回答 1

0

您已经从引导文档中获取了 JS 输出的 HTML,而不是所需的预渲染 HTML。

<div id="myModal" class="modal hide fade">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
    <h3>Modal header</h3>
  </div>
  <div class="modal-body">
    <p>One fine body…&lt;/p>
  </div>
  <div class="modal-footer">
    <a href="#" class="btn">Close</a>
    <a href="#" class="btn btn-primary">Save changes</a>
  </div>

于 2013-09-19T14:50:51.633 回答