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

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Bootstrap 實(shí)例 - 模態(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">
開(kāi)始
</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ū)嵗寮咐治?,希望?duì)大家有所幫助,如果大家有任何疑問(wèn)請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!
相關(guān)文章
-
JavaScript顯示表單內(nèi)元素?cái)?shù)量的方法
這篇文章主要介紹了JavaScript顯示表單內(nèi)元素?cái)?shù)量的方法,涉及javascript操作表單屬性的技巧,具有一定參考借鑒價(jià)值,需要的朋友可以參考下 2015-04-04
-
JavaScript實(shí)現(xiàn)當(dāng)網(wǎng)頁(yè)加載完成后執(zhí)行指定函數(shù)的方法
這篇文章主要介紹了JavaScript實(shí)現(xiàn)當(dāng)網(wǎng)頁(yè)加載完成后執(zhí)行指定函數(shù)的方法,實(shí)例分析了javascript加載頁(yè)面及執(zhí)行函數(shù)的技巧,需要的朋友可以參考下 2015-03-03
-
jsonp跨域獲取數(shù)據(jù)的基礎(chǔ)教程
這篇文章主要給大家介紹了關(guān)于jsonp跨域獲取數(shù)據(jù)的相關(guān)資料,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧 2018-07-07
-
js控制當(dāng)再次點(diǎn)擊按鈕時(shí)的間隔時(shí)間
這篇文章主要介紹通過(guò)js如何控制當(dāng)再次點(diǎn)擊按鈕是的間隔時(shí)間,需要的朋友可以參考下 2014-06-06
-
一段多瀏覽器的"復(fù)制到剪貼板"javascript代碼
一段多瀏覽器的"復(fù)制到剪貼板"javascript代碼... 2007-03-03
-
layui 地區(qū)三級(jí)聯(lián)動(dòng) form select 渲染的實(shí)例
今天小編就為大家分享一篇layui 地區(qū)三級(jí)聯(lián)動(dòng) form select 渲染的實(shí)例,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧 2019-09-09
最新評(píng)論
好久沒(méi)有發(fā)過(guò)自己的代碼的狀態(tài)了,今天編寫(xiě)代碼感覺(jué)有力不從心了。不過(guò)慢慢的找回了感覺(jué),正好朋友問(wèn)了我一個(gè)問(wèn)題,就是如何實(shí)現(xiàn)模態(tài)框。其實(shí)就是引用bootstrap插件來(lái)實(shí)現(xiàn)。下面通過(guò)本文給大家介紹下。
Bootstrap Modals(模態(tài)框)是使用定制的 Jquery 插件創(chuàng)建的。它可以用來(lái)創(chuàng)建模態(tài)窗口豐富用戶(hù)體驗(yàn),或者為用戶(hù)添加實(shí)用功能。您可以在 Modals(模態(tài)框)中使用 Popover(彈出框)和 Tooltip(工具提示插件)。頁(yè)面中的模態(tài)框一般分為注冊(cè)模態(tài)框、變更模態(tài)框、刪除(信息提示)模態(tài)框三種基本模態(tài)框。
好了看代碼。更希望大家互相關(guān)注,留下您的寶貴意見(jiàn)

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Bootstrap 實(shí)例 - 模態(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">
開(kāi)始
</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ū)嵗寮咐治?,希望?duì)大家有所幫助,如果大家有任何疑問(wèn)請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!
相關(guān)文章
JavaScript顯示表單內(nèi)元素?cái)?shù)量的方法
這篇文章主要介紹了JavaScript顯示表單內(nèi)元素?cái)?shù)量的方法,涉及javascript操作表單屬性的技巧,具有一定參考借鑒價(jià)值,需要的朋友可以參考下2015-04-04
JavaScript實(shí)現(xiàn)當(dāng)網(wǎng)頁(yè)加載完成后執(zhí)行指定函數(shù)的方法
這篇文章主要介紹了JavaScript實(shí)現(xiàn)當(dāng)網(wǎng)頁(yè)加載完成后執(zhí)行指定函數(shù)的方法,實(shí)例分析了javascript加載頁(yè)面及執(zhí)行函數(shù)的技巧,需要的朋友可以參考下2015-03-03
jsonp跨域獲取數(shù)據(jù)的基礎(chǔ)教程
這篇文章主要給大家介紹了關(guān)于jsonp跨域獲取數(shù)據(jù)的相關(guān)資料,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧2018-07-07
js控制當(dāng)再次點(diǎn)擊按鈕時(shí)的間隔時(shí)間
這篇文章主要介紹通過(guò)js如何控制當(dāng)再次點(diǎn)擊按鈕是的間隔時(shí)間,需要的朋友可以參考下2014-06-06
一段多瀏覽器的"復(fù)制到剪貼板"javascript代碼
一段多瀏覽器的"復(fù)制到剪貼板"javascript代碼...2007-03-03
layui 地區(qū)三級(jí)聯(lián)動(dòng) form select 渲染的實(shí)例
今天小編就為大家分享一篇layui 地區(qū)三級(jí)聯(lián)動(dòng) form select 渲染的實(shí)例,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧2019-09-09

