• Bootstrap_Javascript_滚动监视器


      滚动监控器是Bootstrap提供的非常实用的JavaScript插件,被广泛应用到Web开发中。其表现形式是:

      1、当用户鼠标滚动时,滚动条的位置会自动更新导航条中相应的导航项。

      2、用户拖动滚动条,当滚动到@mdo时,上面的@mdo导航项就会高亮显示.

    <div class="bs-docs-section">
      <div class="bs-example">
        <nav role="navigation" class="navbar navbar-default navbar-static" id="navbar-example2">
          <div class="container-fluid">
            <div class="navbar-header">
              <button data-target=".bs-example-js-navbar-scrollspy" data-toggle="collapse" type="button" class="navbar-toggle collapsed">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
              </button>
              <a href="#" class="navbar-brand">Project Name</a>
            </div>
            <div class="collapse navbar-collapse bs-example-js-navbar-scrollspy">
              <ul class="nav navbar-nav">
                <li><a href="#fat">@fat</a></li>
                <li><a href="#mdo">@mdo</a></li>
              </ul>
            </div>
          </div>
        </nav>
        <div class="scrollspy-example" data-offset="0" data-target="#navbar-example2" data-spy="scroll">
          <h4 id="fat">@fat</h4>
          <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p>
          <h4 id="mdo">@mdo</h4>
          <p>Veniam marfa mustache skateboard, adipisicing fugiat velit pitchfork beard. Freegan beard aliqua cupidatat mcsweeney's vero. Cupidatat four loko nisi, ea helvetica nulla carles. Tattooed cosby sweater food truck, mcsweeney's quis non freegan vinyl. Lo-fi wes anderson +1 sartorial. Carles non aesthetic exercitation quis gentrify. Brooklyn adipisicing craft beer vice keytar deserunt.</p>
        </div>
      </div><!-- /example -->
  • 相关阅读:
    Mysql表设计需要注意的问题
    Mysql开始root远程访问权限
    python学习之简介
    常用的Git命令
    Java虚拟机类加载机制
    java垃圾回收机制的理解
    解析和操作XML文件
    Hibernate的工作流程以及三种状态(面试题)
    SSH整合
    Spring事务管理的注解方式
  • 原文地址:https://www.cnblogs.com/Ryan344453696/p/5014815.html
Copyright © 2020-2023  润新知