开源:blurify - 一个大小约 2k 的图片高斯模糊库

hxjb6174 8年前
   <h2>blurify</h2>    <h2>Installation</h2>    <pre>  <code class="language-javascript">$ npm i blurify</code></pre>    <h2>Demo</h2>    <p><a href="/misc/goto?guid=4959740731227385944" rel="nofollow,noindex">Demo</a></p>    <h2>Usage</h2>    <h3>blurify(options)</h3>    <p>blurify the images with given options :</p>    <ul>     <li>images { Element }, blurify target elements.</li>     <li>blur { Int }, extent of blur, defaulting to 6 .</li>     <li>mode { String }, mode of blurify.      <ul>       <li>css : use filter property.( default )</li>       <li>canvas : use canvas export base64.</li>       <li>auto : use css mode firstly, otherwise switch to canvas mode by automatically.</li>      </ul> </li>    </ul>    <pre>  <code class="language-javascript">import blurify from 'blurify';    new blurify({      images: document.querySelectorAll('.blurify'),      blur: 6,      mode: 'css',  });</code></pre>