JS库之Waypoints的用法详解

网络编程 发布日期:2024/9/29 浏览次数:1

正在浏览:JS库之Waypoints的用法详解

一款用于捕获各种滚动事件的插件"color: #ff0000">一、最简易的使用

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>waypoints的最简单使用</title>
  <!-- 定义css样式 -->
  <style>
    *{
      padding: 0;
      margin: 0;
    }
    #example-basic{
      height: 500px;
      text-align: center;
    }
  </style>
  <!-- 引入js文件 -->
  <script src="/UploadFiles/2021-04-02/jquery-3.0.0.min.js">

二、能检测鼠标滚动方向的基本应用

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>检测鼠标滚动方向</title>
  <style>
    *{
      padding: 0;
      margin: 0;
    }
    #example-basic{
      height: 500px;
      text-align: center;
    }
    .in{
      font-size: 36px;
      color: #ff0;
      background:red;
      transition:all 0.5s;
    }
  </style>
  <script src="/UploadFiles/2021-04-02/jquery-3.0.0.min.js">

三、鼠标滚动加动画效果的应用

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>加下动画效果的</title>
  <style>
    *{
      padding: 0;
      margin: 0;
    }
    div{
      background: #eee;
    }
    .banner{
      width: 1100px;
      margin: 0 auto;
    }
    .title{
      height: 100px;
      background: #9f9;
    }
    .lt{
      position: relative;
      height: 400px;
      border:1px dotted #999;
    }
    .lt_left{
      position: absolute;
      width: 500px;
      height: 300px;
      left: -20%;
      top: 0;
      margin-left: -550px;
      background: #f99;
    }
    .lt_right{
      position: absolute;
      width: 500px;
      height: 300px;
      left: 120%;
      top: 0;
      margin-left: 50px;
      background: #99f;
    }
  </style>
  <script src="/UploadFiles/2021-04-02/jquery-3.0.0.min.js">

总结

以上所述是小编给大家介绍的JS库之Waypoints的用法详解,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对网站的支持!

在去年的5月23日,借助Intel Bridge Technology以及Intel Celadon两项技术的驱动,Intel为PC用户带来了Android On Windows(AOW)平台,并携手国内软件公司腾讯共同推出了腾讯应用宝电脑版,将Windows与安卓两大生态进行了融合,PC的使用体验随即被带入到了一个全新的阶段。