Skip to content

Instantly share code, notes, and snippets.

@fahim0623
fahim0623 / Split-Images-in-Tiles.markdown
Last active August 29, 2015 14:05
A Pen by Fahim Akhtar.

Split Images in Tiles

This is just to split and image into rows and columns to and properly place next to each other for symmetrical look. Its a simple javascript function invoked on button click. rows and column variable must have minimum 1 as value.

 See in fire bug its splitted 10 columns and 10 rows.
        Its done using background-position and background-size  with a percent calculation. Its responsive also.
        Now each splitted div can be used for animation.

A Pen by Fahim Akhtar on CodePen.