0

我正在寻找 jQuery 模态弹出窗口,它应该显示图像,如示例检查以显示路由号码等,.. 当我点击路由号码(?)问号时,它应该弹出一个图像并且右上角应该有关闭按钮角落。我见过不同的方法,但找不到确切的方法

4

1 回答 1

1

查看Bootstrap 模式。单击Launch demo modal按钮。

<head>确保您包含javascriptjquery和. bootstrap.js您可以bootstrap.js从引导站点下载。您可能还想包括bootstrap.css

完成<head>所有设置后,您需要在正文中添加将被隐藏的模态代码,并且您需要添加一个按钮来显示模态。按钮和模式通过 链接在一起id

<!-- Button to trigger modal -->
<a href="#myModal" role="button" class="btn" data-toggle="modal">Launch demo modal</a>

<!-- 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>
于 2013-05-22T15:31:16.037 回答