zoukankan      html  css  js  c++  java
  • bootstrap使用汇总

    //大多数功能都能够指定data属性来指定 但是,有必要的情况下使用jquery由于事件是不同的过程
    //活动通常有两种状态show shown 通用和过去的


    <!DOCTYPE html>
    <html lang="en">


      <head>
        <title>Bootstrap 101 Template</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <!-- Bootstrap -->
        <link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
        <link href="css/bootstrap-responsive.min.css" rel="stylesheet" media="screen">


          <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js">
          </script>
          <script>
              $(document).ready(function(){
                  $("p").click(function(){
                      $(this).hide();
                  });
                  //通过编写jquery 来展示效果,方法和事件的使用
                  //$("#myModal").modal({show:true,backdrop:true});
                  $('#myModal').on('shown', function () {
                      alert("hahjah");
                  })
              });
          </script>


      </head>
      <body>


    //通过data属性来查看效果
    <!-- Button to trigger modal -->
    <a href="#myModal" role="button" class="btn" data-toggle="modal">查看演示案例</a>
    //指定data属性data-backdrop backdrop是一个可选參数。能够看文档还有非常多实用的属性
    <button type="button" data-backdrop="false" data-toggle="modal" data-target="#myModal">Launch modal</button>
    <!-- Modal -->
    <div id="myModal"  class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
            <h3 id="myModalLabel">Modal header</h3>
        </div>
        <div class="modal-body">
            <p>One fine body…</p>
        </div>
        <div class="modal-footer">
            <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
            <button class="btn btn-primary">Save changes</button>
        </div>
    </div>
    <p>假设您点击我。我会消失。</p>


    <!--***************************************************************************-->
        <script src="http://code.jquery.com/jquery.js"></script>
        <script src="js/bootstrap.min.js"></script>
      </body>
    </html>

    版权声明:本文博主原创文章。博客,未经同意不得转载。

  • 相关阅读:
    [软件工程 2018西北师范大学]实验一 软件工程准备 评分
    【集美大学1411_助教博客】助教总结
    【集美大学1411_助教博客】团队作业10——项目复审与事后分析(Beta版本)
    【集美大学1411_助教博客】团队作业9——测试与发布(Beta版本)
    【集美大学1411_助教博客】团队作业8——第二次项目冲刺(Beta阶段)
    【集美大学1411_助教博客】alpha阶段后 成绩
    Javascript 异步加载详解
    复选框,全选或者全不选
    Java六大必须理解的问题
    写了一个Java的简单缓存模型
  • 原文地址:https://www.cnblogs.com/lcchuguo/p/4808158.html
Copyright © 2011-2022 走看看