Giter Site home page Giter Site logo

barrage's Introduction

demo图

Image

简介

受剧中人和falseLuffy大神的启发 为我自己工作的的项目增加了这个功能 因为需求比较少 所以是个很简单的文字DOM滚动功能 CSS3实现的滚动

// 默认参数
var defaults = {
    // 在哪里产生弹幕
    el: '#barrage',
    // 关闭按钮
    closeEl: '.hide-barrage',
    // 数据的数组 [ {text: ''}, {text: ''} ] text必须有
    data: data,
    // 颜色的数组  {Array}  ['#ff', 'red']
    color: colorArr,
    // 多少个data 分一组  Number 关乎弹幕的上下密集度
    groupSlice: 5,
    // 多少毫秒秒增加一次dom  这个关乎到弹幕的左右间距( 密集度 )
    addIntervar: 3000,
    // 动画时间 25 ~ 20s
    rangeTime: [ 25, 20 ]
};

barrage's People

Contributors

542154968 avatar

Stargazers

 avatar

Watchers

James Cloos 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.