Laravel的猫头鹰旋转木马,六列两列逻辑

How to create logic for this structure?

[1, 2, 3]
[4, 5, 6]

I have photos showing in owl carousel. It should show six photos, three in two columns, and the next six photos should go in second slide, next six in third slide and so on...

When I do this:

<div class="row">
     @foreach($videos as $key => $video)
         @if(($key)%7==0)
            </div><div class="row">
         @endif
            <div class="col-md-4">
               <a id="videos" class="fancybox fancybox.iframe be-relative" href="http://www.youtube.com/embed/><span class="be-absolute"></span></a>
            </div>
     @endforeach
</div>

But, this gives me:

[1, 2, 3]
[3, 4, 5]

... and in second slide I have

[6, 7, 8]
[9, 10, 11]
[12, 13, 14]

... But this 12, 13, 14 should go into third slide.

查看全部
duandu1049
duandu1049
2017/03/04 16:07
  • laravel
  • php
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

2个回复