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>

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

  • 相关阅读:
    js设计模式之 适配器模式与应用场景
    2017版本的IDEA
    JAVA实验六——图形用户界面设计——6-47选择整数计算
    升级apache版本
    基于 PVE + TrueNAS 的私有云配置流程
    基于Win10+VS2019的ceres-solver-2.0.0配置流程
    基于PVE+ROS+LEDE的软路由配置流程
    启动android studio
    vscode配置
    找不到https://raw.githubusercontent.com
  • 原文地址:https://www.cnblogs.com/lcchuguo/p/4808158.html
Copyright © 2011-2022 走看看