blurify
blurify.js is a tiny(~2kb) library to blur pictures, with graceful downgrade support from css
mode to canvas
mode.
Installation
$ npm i blurify
DEMO
Usage
blurify(options)
blurify the images with given options
:
images
{ Element }, blurify target elements.blur
{ Int }, extent of blur, defaulting to6
.mode
{ String }, mode of blurify.css
: usefilter
property.(default
)canvas
: usecanvas
export base64.auto
: usecss
mode firstly, otherwise switch tocanvas
mode by automatically.
; images: document blur: 6 mode: 'css'; // or in shorthand ;
License
Licensed under the MIT License