Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AngularJS ng-repeat items horizontal to vertical

I have a ng-repeat placed on floated left <li> and the list apears in horizontal is there any way to repeat the same but vertical like below:

from:

Item1 Item2 Item3 Item4 Item5

Item6 Item7 Item8 Item9 Item10

to:

Item1 Item3 Item5 Item7 Item9

Item2 Item4 Item6 Item8 Item10

Please help if there is any way to do this

like image 834
Ashok Vishwakarma Avatar asked May 22 '14 10:05

Ashok Vishwakarma


1 Answers

Sure, you can use column-count:

e.g:

ul {
    column-count:5;
    -webkit-column-count:5;
    -moz-column-count:5;
}

Demo Fiddle

like image 169
SW4 Avatar answered Nov 01 '22 03:11

SW4