<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Bootstrap模态框(Modal)插件</title>
<link rel="stylesheet" href="css/bootstrap.min.css">
<script src="js/jquery-2.2.4.js"></script>
<script src="js/bootstrap.min.js"></script>
<style type="text/css">
html,body{font-size: 1.5rem; background-color: #EFEFF4;}
* { margin:0; padding:0; }
body, button, input, select, textarea { font:12px/1.5tahoma, arial, \5b8b\4f53; }
h1, h2, h3, h4, h5, h6{ font-size:100%; }
address, cite, dfn, em, var { font-style:normal; }
code, kbd, pre, samp { font-family:couriernew, courier, monospace; }
small{ font-size:12px; }
ul, ol { list-style:none; }
a { text-decoration:none; color: #000;}
a:hover { text-decoration:underline; }
a:active { text-decoration:none; }
sup { vertical-align:text-top; }
sub{ vertical-align:text-bottom; }
legend { color:#000; }
fieldset, img { border:0; }
button, input, select, textarea { font-size:100%; }
table { border-collapse:collapse; border-spacing:0; }
#myModal{width: 70%;margin: auto;margin-top: 60%; color: #000;padding: 20px;}
#myModal .modal-header button{font-size: 50px;}
#myModal h4{text-align: center;}
#myModal .modal-body{height: 150px;line-height: 100px;font-size: 30px;}
#myModal .modal-footer button{width: 90%;
height: 80px; background: #0088CC;text-align: center;border-radius: 12px;
font-size: 38px;color: #fff; border: none; margin-right: 30px;
}
</style>
</head>
<body>
<!-- 按钮触发模态框 -->
<button class="" data-toggle="modal" data-target="#myModal">
开始演示模态框
</button>
<!-- 模态框(Modal) -->
<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" id="myModalLabel">
提示
</h4>
</div>
<div class="modal-body">
暂未开通
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary"> 提交更改 </button>
</div>
</div>
</div>
</div>
</body>
</html>
前端框架Bootstrap模态框使用
最新推荐文章于 2022-03-23 12:17:02 发布