【Web前端】Bootstrap模态框的使用

模态框效果图

模态框(Modal)是覆盖在父窗体上的子窗体。

通常,目的是显示来自一个单独的源的内容,可以在不离开父窗体的情况下有一些互动。

子窗体可提供信息、交互等。

使用模态框需要引用Bootstrap框架(Bootstrap部分代码通过JQuery实现),所以还要引用JQuery

<!-- 触发模态框按钮 -->
<button class="btn btn-primary" data-toggle="modal" data-target="#modal">触发模态框</button>

<!-- 基础模态框 -->
<div class="modal fade" id="modal" role="dialog">
	<div class="modal-dialog">
		<div class="modal-content">
			<div 

猜你喜欢

转载自blog.csdn.net/Dawson_Ho/article/details/121524014