Effect.js
Javascript DOM Effect Library (CSS3)
- Website: https://daegwang.github.io/lab/effect.js/
- Github: Effect.js
Installation
How to use
Select DOM
var dom = ;
Set Image Url (optional)
var imgUrl = 'https://daegwang.github.io/lab/effect.js/img/sample.jpg';dom; //Change or Set Image Url
After call this Method, IMG
tag is Generated in your Selected DOM
. If Selected DOM
's TagName is IMG
, src value is changed to parameter of setImg.
Give Effect
Opacity
dom;
Radius (border-radius)
dom;
Rotate (deg)
dom;
Scale
dom;
Blur (px)
dom;
GrayScale
dom;
Sepia
dom;
Duration (s)
//Option 1: set Duration at First (default 0)var dom = ; //Option 2: change Durationdom;
Overlay Effect
Scale + Rotate
dom;dom; //same as dom.rotate(30);
Optional: Select DOM (using jQuery)
var dom = ;
Example
Browser Support
- Chrome: 26.0, 4.0 -webkit-
- Safari: 6.1, 3.1 -webkit-
- Edge: 10.0
- Firefox: 16.0, 4.0 -moz-
License
Released under MIT License