5 columns per row in Bootstrap-4

前端 未结 3 1385
忘了有多久
忘了有多久 2021-02-04 16:44

I have 15 records, I want to show all of it in a 5 columns per row. So I am using the auto column available in bootstrap 4 \".col\", is there a way to limit column counts per ro

3条回答
  •  耶瑟儿~
    2021-02-04 16:58

    Seems you use AngularJS. If so, use an ng-reapt-start and ng-repeat-end and track the items of the list by $index. Use a break columns and show it only when ($index + 1) is 5, 10, or 15.

    var app = angular.module('breakColumn', []);
    
    app.controller('MainCtrl', function($scope) {
      $scope.list = [];
      for (let i = 1; i < 16; i++) {
        $scope.list.push(i)
      }
    });
    
    
    
    {{item}}

提交回复
热议问题