An plugin for automatically generate box-shadow for image based on image colors.
- Connect script file to your page
- Initialize plugin
const _isg = new ImageShadowGenerator()- Enjoy!
const _isg = new ImageShadowGenerator({
imgClass: 'myImageClass',
offsetX: 10
})| Setting | Description | Default |
|---|---|---|
| offsetX | Offset for x coordinate of shadow in percents | 0 |
| offsetY | Offset for y coordinate of shadow in percents | 0 |
| imgClass | className of img elements which need to be glowed | _isg |
| shadowBlur | Size of blurring for shadow in percentages | 40 |
| hoverBlurSize | Size of blurring on hover for shadow in percentages | 90 |
| hover | className of img elements which need to be glowed | false |
| debug | className of img elements which need to be glowed | false |

