Show images in 2 or 3 columns based on screen size

Hi all. I have 6 images to show on home screen. And I need to display then in two columns if the device is small. and show then in 3 columns if the device is bigger (or in landscape).
Ex:

[SMALL SCREEN]
1 2
3 4
5 6

[BIG OR LANDSCAP SCREEN]
1 2 3
4 5 6

I tryed using ionic responsive grid with rows and columns but nothing works?

is there a way to do this in CSS or I will have to build it for my own in CSS?