To compensate for your rows, you just need to use the index of the current image to calculate where in the grid the background position should be. Here is an approximate version using a proxy object to keep track of the index: See the Pen RwrmBpJ?editors=0010 by GreenSock (@GreenSock) on CodePen   It would be easier if the image used was better (no extra space).
    • Like