我正在设置一个新脚本,我想对此提供支持。我现在需要在哪里更改代码,因为现在看起来太奇怪了。我想显示配置文件,而不是上下两个。这是显示方式正确的示例:https://imgur.com/a/zOv2mjP
这是我的代码:
<div class="tab-v2 margin-bottom-40">
<?php $count_user = 0; ?>
@foreach($user->contact as $contact)
@if($count_user == 0)
@endif
<?php $count_user++; ?>
<ul class="nav nav-tabs">
<li class="active">
<a data-toggle="tab" href="#contact1">
<?php $img = asset('thumbnail').'/'.$contact->profile_picture; ?>
<img class="img-circle noticeboard-profile-picture" src="{{ url('ass/50/50?'.$img) }}" alt=""></a>
</li>
<li>
<a data-toggle="tab" href="#contact2">
<?php $img = asset('thumbnail').'/'.$contact->profile_picture; ?>
<img class="img-circle noticeboard-profile-picture" src="{{ url('ass/50/50?'.$img) }}" alt=""></a>
</li>
</ul>
<div class="tab-content">
<div id="contact1" class="tab-pane magazine-sb-categories active">
<div class="row team-v1">
<ul class="list-unstyled col-xs-12" style="margin-bottom: -10px">
<li><h3 style="margin-top: 5px !important;text-transform: none; "><a href="{{ url('') }}/{{ $contact->username }}"> {{ $contact->username }}</a></h3><p>
<strong><i class="icon-real-estate-020 u-line-icon-pro"></i> : </strong><a href="#">{{ $contact->country->country }}</a><br>
<strong><i class="icon-screen-tablet fa-" aria-hidden="true"></i> : </strong><a href="#">{{ $contact->industry->industry }}</a><br>
<strong><i class="icon-frame fa-" aria-hidden="true"></i> : </strong><a href="#">{{ $contact->organization_type->organization_type }}</a><br>
</p>
</li></ul>
</div>
@if($count_user == 2)
</div>
@break;
<?php $count_user = 0; ?>
@endif
@endforeach
答案 0 :(得分:1)
您可以尝试修改样式表以内联显示无序列表元素:
ul li { display: inline; }
答案 1 :(得分:0)
您可以使用div标签根据列将页面划分,如下所示。无论如何,您都可以使用@foreach @endforeach
@foreach ($contacts as $contact)
<div class="row">
<div class="col-sm-4" style="display:block; height:300px; overflow:hidden">
<?php $img = asset('thumbnail').'/'.$contact->profile_picture; ?>
<img class="img-circle noticeboard-profile-picture" src="{{ url('ass/50/50?'.$img) }}" alt=""></a>
</div>
</div>
<hr>
@endforeach