Simple and small Javascript plugin to display the shadow of an image!
Switch branches/tags
Nothing to show
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets Rename video May 17, 2018
LICENSE Initial commit May 13, 2018
README.md Update README.md May 16, 2018
index.html Removed one video May 17, 2018

README.md

Preview

Image shadow !

Simple and small Javascript plugin to display the shadow of the image!


Download Shadow-image

$ git clone https://github.com/tunguskha/Image-shadow

Import

<script src="assets/js/image-shadow.js"></script>

Use it

All you need is .ishadow wrapper to the image and blur value in data attribute

<div class="ishadow">
  <img class="img" data-blur="20" src="assets/imgs/halt-and-catch-fire.jpg">
</div>

Use it for video

Same as a image, add .vshadow wrapper, and control autoplay and loop in data-attribute.

NOTE: I currently work for video support, it works but it's not the best solution.

<div class="vshadow">
  <video
    autoplay preload loop
    data-autoplay="true" data-loop="true" data-blur="15"
    src="assets/videos/video-1.mp4" type="video/mp4"></video>
</div>

Support

IE Edge Firefox Chrome Safari Opera
✔️ ✔️ ✔️ ✔️

See it live

Image-shadow