欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

整理關(guān)于Bootstrap過渡動(dòng)畫的慕課筆記

 更新時(shí)間:2017年03月29日 09:23:07   作者:大大大大大桃子  
這篇文章主要為大家整理了關(guān)于Bootstrap動(dòng)畫過渡的慕課筆記,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下

整理自慕課筆記

動(dòng)畫過渡(Transitions): 源文件:transition.js

Bootstrap框架默認(rèn)給各個(gè)組件提供了基本動(dòng)畫的過渡效果,如果要使用,有兩種方法:

* 調(diào)用統(tǒng)一編譯的bootstrap.js;
* 調(diào)用單一的過渡動(dòng)畫的JavaScript插件文件transition.js(右側(cè)第29行引入Bootstrap上對(duì)外公布的transition.js的地址)。

transition.js文件為Bootstrap具有過渡動(dòng)畫效果的組件提供了動(dòng)畫過渡效果。不過需要注意的是,這些過渡動(dòng)畫都是采用CSS3來實(shí)現(xiàn)的,所以IE6-8瀏覽器是不具備這些過渡動(dòng)畫效果。

默認(rèn)情況之下,Bootstrap框架中以下組件使用了過渡動(dòng)畫效果:
* 模態(tài)彈出窗(Modal)的滑動(dòng)和漸變效果;
* 選項(xiàng)卡(Tab)的漸變效果;
* 警告框(Alert)的漸變效果;
* 圖片輪播(Carousel)的滑動(dòng)效果。

下面舉了一個(gè)“模態(tài)彈出窗(Modal)的滑動(dòng)和漸變效果”源代碼例子。

<body>
<button class="btn btn-primary" type="button">點(diǎn)擊我</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">&times;</span>
     <span class="sr-only">Close</span>
    </button>
    <h4 class="modal-title">模態(tài)彈出窗標(biāo)題</h4>
   </div>
   <div class="modal-body">
    <p>模態(tài)彈出窗主體內(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 -->

<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>
<script src="http://cdn.bootcss.com/bootstrap/2.3.1/js/bootstrap-transition.js"></script>
<script src="http://cdn.bootcss.com/bootstrap/2.3.1/js/bootstrap-modal.js"></script>
<script>
 $(function(){
 $(".btn").click(function(){
  $("#mymodal").modal("toggle");
 });
 });
</script>
</body>

如果大家還想深入學(xué)習(xí),可以點(diǎn)擊這里進(jìn)行學(xué)習(xí),再為大家附3個(gè)精彩的專題:

Bootstrap學(xué)習(xí)教程

Bootstrap實(shí)戰(zhàn)教程

Bootstrap插件使用教程

Bootstrap Table使用教程

以上就是本文的全部內(nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

最新評(píng)論