Create grid effect for images
justify-multiple-images depends on plain javascript. To use it, include this in your page :
<script src="image_grid_effect.js" type="text/javascript"></script>
Set id image
for img element and target element id with main
. the default canvas width
and height
is to set to 300 x 300
. You can customize your own width and height as shown below.
<img id='image' src='effect.png' />
<div id='main'></div>
Now add this JavaScript code to your page :
$(function() {
// rows = colomns = numberOfGrids = 4;
// imageToGrid(numberOfGrids, width of canvas, height of canvas);
imageToGrid(2, 300, 300);
});
You're done.
See it in action on our home page.
Venkata Ramana P
Copyright 2019 Itsmepvr under The MIT License (MIT).