Coder Social home page Coder Social logo

ripple's Introduction

Ripple.js

鼠标点击水波纹插件

用法

1、引入js

<script src="ripple.js"></script>

2、调用

<script type="text/javascript">
    new Ripple()
</script>

3、在需要添加效果的元素上加上: data-ripple="ripple"

<div data-ripple="ripple">
    div标签
</div>

4、配置项

参数 数据类型 缺省值 说明
opacity number 0.5 水波纹透明度 0.1 - 1
speed number 0.6 水波纹扩散速度 单位为秒
bgColor string #ffffff 水波纹颜色
cursor boolean true 是否显示手指鼠标指针
new Ripple({
    opacity : 0.6,  //水波纹透明度
    speed : 1,      //水波纹扩散速度
    bgColor : "#ffffff", //水波纹颜色
    cursor : false  //是否显示手型指针
})

5、兼容性

不支持IE9及下版本

Demo

https://megeee.github.io/ripple/

ripple's People

Contributors

megeee 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.