AngularJS ng-repeat项目水平到垂直

时间:2022-08-23 23:41:07

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:

我有一个ng-repeat放在浮动的左边

  • 上,并且水平列表apears有没有办法重复相同但垂直如下:

  • from:

    Item1 Item2 Item3 Item4 Item5

    Item1 Item2 Item3 Item4 Item5

    Item6 Item7 Item8 Item9 Item10

    项目6项目7项目8项目9项目10

    to:

    Item1 Item3 Item5 Item7 Item9

    Item1 Item3 Item5 Item7 Item9

    Item2 Item4 Item6 Item8 Item10

    Item2 Item4 Item6 Item8 Item10

    Please help if there is any way to do this

    如果有任何办法,请帮忙

    1 个解决方案

    #1


    12  

    Sure, you can use column-count:

    当然,你可以使用列数:

    e.g:

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

    Demo Fiddle

    #1


    12  

    Sure, you can use column-count:

    当然,你可以使用列数:

    e.g:

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

    Demo Fiddle