The way it's done is like so: They use 3 images, one for the top of the box, one for the middle and one for the bottom. The middle one is put on repeat-y to that it repeats itself depending on the height of the box. JS is being used for the collaps. Both CSS and JS can be used for the transition animation.





