A simple JavaScript plugin to
A simple JavaScript plugin to recreate the iOS7 style blurry header. Check out the demo at jaden.io/blear (works best in Safari).
Getting StartedReference either blear.js
or blear.min.js
just before the end of the body
tag.
<script src="blear.js"></script> </body> </html>
Create a new instance of Blear and pass in the element as the first parameter.
<script> var header = document.getElementById('main-header'); var blear = new Blear(header); </script> API Blear(element, [options]) element
Type: Node object
Type: integer
Default: 20
Pixel representation of the blur radius.
backgroundType: string
Default: #ffffff
Hash color code for the element's background.
opacityType: decimal
Default: 0.6
Opacity value from 0.0 to 1.0.
wrapperType: string
Default: .blear-wrap
The CSS class for the wrapper element. Must be prefixed with .
Type: string
Default: .blear
The CSS class for the blur element. Must be prefixed with .
MIT © Jaden Dessureault. See LICENSE for details.
版权声明:
1、该文章(资料)来源于互联网公开信息,我方只是对该内容做点评,所分享的下载地址为原作者公开地址。2、网站不提供资料下载,如需下载请到原作者页面进行下载。