Bootstrap 模態(tài)框?qū)嵗寮咐治?/h1>
更新時間:2016年12月28日 09:46:08 作者:http://www.cnblogs.com/liubofight/p/6227624.html
Bootstrap Modals(模態(tài)框)是使用定制的 Jquery 插件創(chuàng)建的。它可以用來創(chuàng)建模態(tài)窗口豐富用戶體驗,或者為用戶添加實用功能。下面通過本文給大家介紹如何使用bootstrap插件來實現(xiàn)模態(tài)框
好久沒有發(fā)過自己的代碼的狀態(tài)了,今天編寫代碼感覺有力不從心了。不過慢慢的找回了感覺,正好朋友問了我一個問題,就是如何實現(xiàn)模態(tài)框。其實就是引用bootstrap插件來實現(xiàn)。下面通過本文給大家介紹下。
Bootstrap Modals(模態(tài)框)是使用定制的 Jquery 插件創(chuàng)建的。它可以用來創(chuàng)建模態(tài)窗口豐富用戶體驗,或者為用戶添加實用功能。您可以在 Modals(模態(tài)框)中使用 Popover(彈出框)和 Tooltip(工具提示插件)。頁面中的模態(tài)框一般分為注冊模態(tài)框、變更模態(tài)框、刪除(信息提示)模態(tài)框三種基本模態(tài)框。
好了看代碼。更希望大家互相關(guān)注,留下您的寶貴意見

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Bootstrap 實例 - 模態(tài)框(Modal)插件</title>
<link rel="stylesheet" >
<script src="https://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<style>
h4{
text-align: center;
}
.c-right{
width:100%;
height:130px;
border: 1px solid #fff;
background-color: #fff;
}
.foot a{
text-decoration-line: none;
}
.one {
width: 65%;
height: 40px;
margin-top: 5px;
margin-left: 35px;
border-radius: 5px;
color: #999;
line-height: 40px;
padding-left: 16px;
border: 1px solid #e5e5e5;
}
.two {
width: 65%;
height: 40px;
margin-top: 5px;
border-radius: 5px;
margin-left: 35px;
color: #999;
line-height: 40px;
padding-left: 16px;
border: 1px solid #e5e5e5;
}
.login_submit {
width: 62%;
height: 25px;
color: #fff;
background: #FB5C5A;
border: 0;
margin-left: 45px;
outline: none;
border-radius: 3px;
}
.footer{
width: 100%;
height:80px;
border: 1px solid #333333;
background-color:#333333;
margin-left: 200px;
}
</style>
</head>
<body>
<button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
開始
</button>
<!-- 模態(tài)框(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">
網(wǎng)上輔導(dǎo)管理系統(tǒng)
</h4>
</div>
<div class="modal-body">
<div id="div2" class="div2 Absolute-Center">
<div class="c-right">
<div class="middle">
<p><input type="text"id="username" class="one"name="username"placeholder="username"></p>
<p><input type="password"id="" class="two" name="password"placeholder="password"></p>
</div>
<div class="foot">
<p>
<input type="submit" class="login_submit" id="btn2" value="登入"/>
</p>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">關(guān)閉
</button>
<button type="button" class="btn btn-primary">
提交更改
</button>
</div>
</div>
</div>
</div>
</body>
</html>
以上所述是小編給大家介紹的Bootstrap 模態(tài)框?qū)嵗寮咐治?,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復(fù)大家的。在此也非常感謝大家對腳本之家網(wǎng)站的支持!
相關(guān)文章
-
JavaScript顯示表單內(nèi)元素數(shù)量的方法
這篇文章主要介紹了JavaScript顯示表單內(nèi)元素數(shù)量的方法,涉及javascript操作表單屬性的技巧,具有一定參考借鑒價值,需要的朋友可以參考下 2015-04-04
-
JavaScript實現(xiàn)當(dāng)網(wǎng)頁加載完成后執(zhí)行指定函數(shù)的方法
這篇文章主要介紹了JavaScript實現(xiàn)當(dāng)網(wǎng)頁加載完成后執(zhí)行指定函數(shù)的方法,實例分析了javascript加載頁面及執(zhí)行函數(shù)的技巧,需要的朋友可以參考下 2015-03-03
-
jsonp跨域獲取數(shù)據(jù)的基礎(chǔ)教程
這篇文章主要給大家介紹了關(guān)于jsonp跨域獲取數(shù)據(jù)的相關(guān)資料,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧 2018-07-07
-
一段多瀏覽器的"復(fù)制到剪貼板"javascript代碼
一段多瀏覽器的"復(fù)制到剪貼板"javascript代碼... 2007-03-03
-
layui 地區(qū)三級聯(lián)動 form select 渲染的實例
今天小編就為大家分享一篇layui 地區(qū)三級聯(lián)動 form select 渲染的實例,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧 2019-09-09
最新評論
好久沒有發(fā)過自己的代碼的狀態(tài)了,今天編寫代碼感覺有力不從心了。不過慢慢的找回了感覺,正好朋友問了我一個問題,就是如何實現(xiàn)模態(tài)框。其實就是引用bootstrap插件來實現(xiàn)。下面通過本文給大家介紹下。
Bootstrap Modals(模態(tài)框)是使用定制的 Jquery 插件創(chuàng)建的。它可以用來創(chuàng)建模態(tài)窗口豐富用戶體驗,或者為用戶添加實用功能。您可以在 Modals(模態(tài)框)中使用 Popover(彈出框)和 Tooltip(工具提示插件)。頁面中的模態(tài)框一般分為注冊模態(tài)框、變更模態(tài)框、刪除(信息提示)模態(tài)框三種基本模態(tài)框。
好了看代碼。更希望大家互相關(guān)注,留下您的寶貴意見

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Bootstrap 實例 - 模態(tài)框(Modal)插件</title>
<link rel="stylesheet" >
<script src="https://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<style>
h4{
text-align: center;
}
.c-right{
width:100%;
height:130px;
border: 1px solid #fff;
background-color: #fff;
}
.foot a{
text-decoration-line: none;
}
.one {
width: 65%;
height: 40px;
margin-top: 5px;
margin-left: 35px;
border-radius: 5px;
color: #999;
line-height: 40px;
padding-left: 16px;
border: 1px solid #e5e5e5;
}
.two {
width: 65%;
height: 40px;
margin-top: 5px;
border-radius: 5px;
margin-left: 35px;
color: #999;
line-height: 40px;
padding-left: 16px;
border: 1px solid #e5e5e5;
}
.login_submit {
width: 62%;
height: 25px;
color: #fff;
background: #FB5C5A;
border: 0;
margin-left: 45px;
outline: none;
border-radius: 3px;
}
.footer{
width: 100%;
height:80px;
border: 1px solid #333333;
background-color:#333333;
margin-left: 200px;
}
</style>
</head>
<body>
<button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
開始
</button>
<!-- 模態(tài)框(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">
網(wǎng)上輔導(dǎo)管理系統(tǒng)
</h4>
</div>
<div class="modal-body">
<div id="div2" class="div2 Absolute-Center">
<div class="c-right">
<div class="middle">
<p><input type="text"id="username" class="one"name="username"placeholder="username"></p>
<p><input type="password"id="" class="two" name="password"placeholder="password"></p>
</div>
<div class="foot">
<p>
<input type="submit" class="login_submit" id="btn2" value="登入"/>
</p>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">關(guān)閉
</button>
<button type="button" class="btn btn-primary">
提交更改
</button>
</div>
</div>
</div>
</div>
</body>
</html>
以上所述是小編給大家介紹的Bootstrap 模態(tài)框?qū)嵗寮咐治?,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復(fù)大家的。在此也非常感謝大家對腳本之家網(wǎng)站的支持!
相關(guān)文章
JavaScript顯示表單內(nèi)元素數(shù)量的方法
這篇文章主要介紹了JavaScript顯示表單內(nèi)元素數(shù)量的方法,涉及javascript操作表單屬性的技巧,具有一定參考借鑒價值,需要的朋友可以參考下2015-04-04
JavaScript實現(xiàn)當(dāng)網(wǎng)頁加載完成后執(zhí)行指定函數(shù)的方法
這篇文章主要介紹了JavaScript實現(xiàn)當(dāng)網(wǎng)頁加載完成后執(zhí)行指定函數(shù)的方法,實例分析了javascript加載頁面及執(zhí)行函數(shù)的技巧,需要的朋友可以參考下2015-03-03
jsonp跨域獲取數(shù)據(jù)的基礎(chǔ)教程
這篇文章主要給大家介紹了關(guān)于jsonp跨域獲取數(shù)據(jù)的相關(guān)資料,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2018-07-07
一段多瀏覽器的"復(fù)制到剪貼板"javascript代碼
一段多瀏覽器的"復(fù)制到剪貼板"javascript代碼...2007-03-03
layui 地區(qū)三級聯(lián)動 form select 渲染的實例
今天小編就為大家分享一篇layui 地區(qū)三級聯(lián)動 form select 渲染的實例,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧2019-09-09

