Git Product home page Git Product logo

jquery-text-scrolltop's Introduction

note

由于项目中用到这个效果,网上又搜索不到,所以干脆封装了一个。

使用

  • 1 依赖 jquery , jquery.easing.js ;

  • 2 页面中直接引入 lib/index.js 。

  • 3 生成实例对象

    • var obj = new rollTxt(id , options);
    • 实例对象提供两个方法, 这两个方法传参为文本内容 :
      • updateText : 实时纠正效果
      • startMove : 生成动画

id 参数

id 为容器元素id 

options配置参数

bottom: '80%',         //相对父级要移动的距离
,opacity : 0.3         //终止显示透明度
,fontSize : '16px'     //终止显示的字体大小
,time : 4000           //动画时长 单位 ms
,ease : 'easeOutQuart' //动画效果

jquery-text-scrolltop's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.