• Stars
    star
    179
  • Rank 214,039 (Top 5 %)
  • Language
    CSS
  • License
    MIT License
  • Created almost 8 years ago
  • Updated almost 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

CSS3 animation library for wechat app.

Ripples.wxss

Ripples.wxss 是一个为微信小程序量身定制的 css3 动效库,引领微交互的潮流。大部分动效源自 Animate.css

安装

  1. 如果你的微信小程序项目基于 nodejs 开发,你可以使用 npm 安装,并拷贝到相关目录后 @import
npm install ripples.wxss --save
  1. 或者直接 clonedownload 仓库https://github.com/jeasonstudio/Ripples.wxss.git,拷贝 ripples.wxssripples.min.wxss到相关目录后 @import

使用

  1. 首先在你想引入 Ripples.wxss 动效的 element 上加 ripple class。

  2. 如果你想让他循环不断播放,请添加 infinite class。

<view class="ripple infinite bounce">element</view>
  1. 接下来你需要再添加如下你需要的 class:
  • bounce
  • flash
  • pulse
  • rubberBand
  • shake
  • headShake
  • swing
  • tada
  • wobble
  • jello
  • bounceIn
  • -bounceInDown
  • -bounceInLeft
  • -bounceInRight
  • bounceInUp
  • bounceOut
  • bounceOutDown
  • bounceOutLeft
  • bounceOutRight
  • bounceOutUp
  • fadeIn
  • fadeInDown
  • -fadeInDownBig
  • fadeInLeft
  • -fadeInLeftBig
  • fadeInRight
  • -fadeInRightBig
  • fadeInUp
  • fadeInUpBig
  • fadeOut
  • fadeOutDown
  • fadeOutDownBig
  • fadeOutLeft
  • fadeOutLeftBig
  • fadeOutRight
  • fadeOutRightBig
  • fadeOutUp
  • fadeOutUpBig
  • flipInX
  • flipInY
  • flipOutX
  • flipOutY
  • lightSpeedIn
  • lightSpeedOut
  • rotateIn
  • rotateInDownLeft
  • rotateInDownRight
  • rotateInUpLeft
  • rotateInUpRight
  • rotateOut
  • rotateOutDownLeft
  • rotateOutDownRight
  • rotateOutUpLeft
  • rotateOutUpRight
  • hinge
  • rollIn
  • rollOut
  • zoomIn
  • zoomInDown
  • zoomInLeft
  • zoomInRight
  • zoomInUp
  • zoomOut
  • zoomOutDown
  • zoomOutLeft
  • zoomOutRight
  • zoomOutUp
  • slideInDown
  • slideInLeft
  • slideInRight
  • slideInUp
  • slideOutDown
  • slideOutLeft
  • slideOutRight
  • slideOutUp

具体样式可以参考 Animate.css

使用实例

  • 你可以查看根目录下的 DEMO 项目,为所有 Ripples.wxss 的综合展示:

demo

  • 也可以参考如下的例子:
//imdex.js
Page({
   data: {
       bounceShow: false
   },
   showBounce: function () {
   	let that = this
       that.setData({
           bounceShow: true
       })
       setTimeout(function() {
           that.setData({
               bounceShow: false
           }, 2000)
       })
}}
/* imdex.wxss */
@import "ripples.wxss";
<!--index.wxml-->
<view class="ripple {{bounceShow ? bounce:''}}">bounce</view>
  • 不同场景下的使用逻辑还请自行斟酌。

个性化引入

Ripple.wxss 使用 gulp.js 进行 wxss 的格式化和压缩,所以你也可以用它来个性化生成 Ripples.min.wxss 后引入,以避免代码冗余。

  1. 你需要安装 gulp 和其他依赖
$ cd path/to/Ripples.wxss/
$ sudo npm install
  1. 你可以执行 gulp 命令,来生成 ripples.wxss ripples.min.wxss 文件,具体包含请参见并修改根目录下的 ripples-config.json 文件。
"attention_seekers": {
  "bounce": true,
  "flash": false,
  "pulse": false,
  "shake": true,
  "headShake": true,
  "swing": true,
  "tada": true,
  "wobble": true,
  "jello":true
}

开源协议

More Repositories

1

CN-VScode-Docs

VScode说明文档翻译
1,041
star
2

chrome-ai

Vercel AI provider for Chrome built-in model (Gemini Nano)
TypeScript
266
star
3

git-hook-996

Git pre-commit hook for 996.
JavaScript
32
star
4

oxygen-demo

JavaScript
24
star
5

USTB_FPGA_ExperimentReport_Pros

北京科技大学 数字逻辑 FPGA 实验报告及项目文件
Verilog
19
star
6

runestone

👁‍🗨 Ordinals runestone javascript implementation
Rust
18
star
7

solidity-antlr4

✨ Solidity Language Lexer and Parser, generated by official ANTLR4 grammar.
TypeScript
16
star
8

USTB-TeachSystem-API

北京科技大学,教务管理系统接口(非官方)
Go
13
star
9

GaussianBlur

GaussianBlur for golang go 语言图像处理库——高斯模糊
Go
12
star
10

react-component-storybook

Use vitejs, storybook and typescript to build great react components and documents.
TypeScript
10
star
11

hulk

Hulk.js: An express middleware provide Mock data service.
JavaScript
9
star
12

DataStructureHomework

数据结构课堂作业+大作业+计组部分+MATLAB部分
C
9
star
13

AutoMail-SS

Spy ShaowSocks from some websites And mail it to TagEmail
Go
8
star
14

cnlint

Lint tool for markdown with Simplified Chinese and English
JavaScript
6
star
15

FunCode-Test-USTB

Coding test with FunCode Games in USTB 2016.7
C#
6
star
16

tinyevm

Tiny TypeScript implementation of the Ethereum EVM.
TypeScript
6
star
17

solidity-language-server

Language Server Protocol implementation for Solidity.
Solidity
6
star
18

WeAppInit-forMac

为使用 MacOS 的小程序开发者 制作
Shell
5
star
19

Steve-Love2D

A Game By Lua & Love2D Engine. Steve is a little Dragon in Chrome offline.
Lua
4
star
20

LowPoly2D

LowPoly2D for Golang go 语言2d低面设计算法实现
Go
3
star
21

wechat_Beautifullogin

微信小程序登录页
JavaScript
3
star
22

koa-swagger-starterkit

Starter kit of koajs, swagger, typescript to create the best RESTful nodejs server.
TypeScript
3
star
23

Sketch-SVG

Draw the SVG Animations by Sketch And JavaScript. @JeasonStudio
HTML
3
star
24

CloudKeyBoard-CN

对现有键盘进行优化改良,简化键盘使用,便于中文打字,支持个性化配置及云端同步,通过生产推广该键盘,令用户拥有更加流畅舒适的键盘体验,引领键盘交互新潮流。
Python
3
star
25

fantoken-screener

TypeScript
2
star
26

webpack-Stylus

采用Stylus、ES6和webpack进行简单高效的前端项目重构结构
HTML
2
star
27

quickjs.wasm

Compile quick.js to webassembly and push to ghcr as standard OCI image.
JavaScript
2
star
28

iWeAther-APP

Weather Web App by PWA & ServiceWorker for Baidu's Recruitment @JeasonStudio 2015-2017
JavaScript
2
star
29

awesomeScript

运行在“油猴”Chrome、Safari、Firefox 插件上的屏蔽百度广告以及无关搜索项的脚本
JavaScript
2
star
30

FontShow

女朋友说要练字,于是便有了 FontShow .
JavaScript
2
star
31

awesome-Jeason

Some Ideas
HTML
2
star
32

raycast

my raycast extensions.
Shell
2
star
33

wasmer-cri

Implementation of WebAssembly Runtime(wasmer-go) CRI(Container Runtime Interface) for kubelet.
Go
2
star
34

iou

A Gift for My GirlFriend JFM
JavaScript
2
star
35

Leetcode

My LeetCode Practice in JavaScript(es5)
JavaScript
1
star
36

farcaster-frame-inscriptions

TypeScript
1
star
37

j.eason.today

HTML
1
star
38

MachineLearning-ImageProcess

机器学习在图像处理方面的应用
Go
1
star
39

hfm

Host file manager for command line.
JavaScript
1
star
40

clashx-config

Personal clashx pro config generator
TypeScript
1
star
41

ImageColorProcess

图像单色处理,使用语言:Golang
Go
1
star
42

golang

golang_test
Go
1
star
43

ipfscdn.cc

IPFS cdn
Go
1
star
44

Birthday-Surprise

A BIG Birthday-Surprise For My GirlFiend
JavaScript
1
star
45

zhuanlan-API

知乎专栏 API 分析
HTML
1
star
46

keeper

A time ticker by GoLang
Go
1
star
47

Spy-zhihu-golang

A Spyder of zhihu with golang by Jeason
Go
1
star
48

GoNaturalLanguageProcessing

Natural language processing by Golang
Go
1
star
49

jeasonstudio.github.io

Jeason's blog
CSS
1
star
50

ng-gulp-swiper-seed

为写简单 HTML5 展示页的同志们造的轮子,基于 AngularJS 1.x + gulp + swiper
JavaScript
1
star
51

gaodentist

给我哥的结婚礼物
1
star
52

NodeMCU-Learn

在学习IoT开发板,NodeMCU过程中瞎JB写的小东西
Lua
1
star
53

resume

Resumes of Jeason.
Vue
1
star
54

alertJS

一个优化 alert 的 JS 库
HTML
1
star
55

doSomeShit-

程序中变量、函数起名工具
CSS
1
star
56

gogc

GC by GoLang
Go
1
star
57

MOJOY_FEATURE

魔借精选单页,嵌入 app 内的 webview,VueJS-Simple+ServiceWorker
JavaScript
1
star
58

utools-plugin-projj

Utools plugin for projj.
1
star
59

front-end-snippets

VSCode snippets extension, for front-end developers
JavaScript
1
star
60

MammaryCancerPaper

与疾控中心合作的问卷系统前端 & 北科大本科生创新训练项目(SRTP)
CSS
1
star
61

vector-indexed-db

Lightweight and efficient vector database in browser
TypeScript
1
star