bootstrap模态窗口怎么设置

bootstrap模态窗口怎么设置,第1张

在您的网站中使用 Bootstrap Modals(模态框)

下面的实例演示了如何在网页中使用 Bootstrap Modals(模态框)。请注意,您不需要编写任何的 JavaScript 代码。实例后面附有相关的解释。

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="utf-8">

<title>Twitter Bootstrap Modals Example</title>

<meta name="description" content="在您的网站中使用 Bootstrap Modals(模态框)下面的实例演示了如何在网页中使用 Bootstrap Modals(模态框)。请注意,您不需要编写任何的 JavaScript 代码。实例后面附有相关的解释。&lt!DOC">

<link href="/twitter-bootstrap/twitter-bootstrap-v2/docs/assets/css/bootstrap.css" rel="stylesheet">

</head>

<body>

<div class="container">

<h2>Example of creating Modals with Twitter Bootstrap</h2>

<div id="example" class="modal hide fade in" style="display: none">

<div class="modal-header">

<a class="close" data-dismiss="modal">×</a>

<h3>This is a Modal Heading</h3>

</div>

<div class="modal-body">

<h4>Text in a modal</h4>

<p>You can add some text here.</p>

</div>

<div class="modal-footer">

<a href="#" class="btn btn-success">Call to action</a>

<a href="#" class="btn" data-dismiss="modal">Close</a>

</div>

</div>

<p><a data-toggle="modal" href="#example" class="btn btn-primary btn-large">Launch demo modal</a></p>

</div>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>

<script src="/twitter-bootstrap/twitter-bootstrap-v2/js/bootstrap-modal.js"></script>

</body>

</html>

otstrap Modals(模态框)是使用定制的 Jquery 插件创建的。它可以用来创建模态窗口丰富用户体验,或者为用户添加实用功能。您可以在 Modals(模态框)中使用 Popover(d出框)和 Tooltip(工具提示插件)。

在本教程中,将通过一些实例和解释来讨论如何使用 Bootstrap 创建模态窗口。同时,我们也会讨论用于定制的各种可用选项。

什么是必需的

您需要 Jquery、Bootstrap CSS 和 JavaScript 文件 bootstrap-modal.js。这个 js 文件位于您下载的 Bootstrap 主文件夹中的 js 文件夹内。

Jquery 位于您的 Bootstrap 主文件夹中的 docs >assets >js 下,名为 jquery.js。或者您可以直接访问


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/bake/7972019.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-04-12
下一篇2023-04-12

发表评论

登录后才能评论

评论列表(0条)

    保存