Bootstrap實現(xiàn)帶動畫過渡的彈出框
更新時間:2016年08月09日 15:13:26 作者:smartbetter
這篇文章主要為大家詳細(xì)介紹了Bootstrap實現(xiàn)帶動畫過渡的彈出框,具有一定的參考價值,感興趣的小伙伴們可以參考一下
先看看效果圖:

代碼:
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>帶動畫過的渡彈出框</title>
<link rel="stylesheet" >
<!--css樣式-->
<style >
body{margin:30px;padding:30px;}
</style>
</head>
<body>
<button class="btn btn-primary" type="button">點擊我</button>
<div class="modal fade" id="mymodal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">
<span aria-hidden="true">×</span><span class="sr-only">Close</span>
</button>
<h4 class="modal-title">彈出窗標(biāo)題</h4>
</div>
<div class="modal-body">
<p>彈出窗主體內(nèi)容</p>
</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><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- 放置在文檔的結(jié)尾,使頁面加載速度更快 -->
<!-- 如果要使用Bootstrap的js插件,必須先調(diào)入jQuery -->
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.min.js"></script>
<!-- 包括所有bootstrap的js插件或者可以根據(jù)需要使用的js插件調(diào)用 -->
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<script>
$(function(){
$(".btn").click(function(){
$("#mymodal").modal("toggle");
});
});
</script>
</body>
</html>
如果大家還想深入學(xué)習(xí),可以點擊這里進行學(xué)習(xí),再為大家附3個精彩的專題:
以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。
您可能感興趣的文章:
- 在iframe中使bootstrap的模態(tài)框在父頁面彈出問題
- Bootstrap彈出框之自定義懸??驑?biāo)題、內(nèi)容和樣式示例代碼
- Bootstrap的popover(彈出框)2秒后定時消失的實現(xiàn)代碼
- 擴展bootstrap的modal模態(tài)框-動態(tài)添加modal框-彈出多個modal框
- Bootstrap實現(xiàn)提示框和彈出框效果
- Bootstrap編寫一個在當(dāng)前網(wǎng)頁彈出可關(guān)閉的對話框 非彈窗
- Bootstrap彈出框(modal)垂直居中的問題及解決方案詳解
- 關(guān)于Bootstrap彈出框無法調(diào)用問題的解決辦法
- JS組件Bootstrap實現(xiàn)彈出框和提示框效果代碼
- bootstrap實現(xiàn)點擊刪除按鈕彈出確認(rèn)框的實例代碼
相關(guān)文章
javaScript實現(xiàn)浮點數(shù)轉(zhuǎn)十六進制字符
浮點數(shù)轉(zhuǎn)十六進制的方法有很多,在本文將為大家詳細(xì)介紹下js中時如何實現(xiàn)的,下面有個不錯的示例,感興趣的朋友可以參考下,希望對大家有所幫助2013-10-10
JavaScript三種綁定事件方式及相互之間的區(qū)別分析
這篇文章主要介紹了JavaScript三種綁定事件方式及相互之間的區(qū)別,結(jié)合具體實例形式分析了javascript事件綁定方式的基本實現(xiàn)方法與相互之間的區(qū)別,需要的朋友可以參考下2017-01-01

