/Image-shadow

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

Primary LanguageJavaScriptMIT LicenseMIT

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