我有這個麻煩 - 該圖片無法顯示形象Laravel不顯示4
<div class="carousel-inner">
@foreach ($model->pictures as $picture)
<div class="fill"
style="background-image:url({{ URL::asset($picture->path) }});">
</div>
<!-- {{ HTML::image($picture->path)}} -->
@endforeach
</div>
,如果我去到的圖像是正常的查看源代碼,其實我粘貼結果的URL和作品。順便說一句,我有一個註釋行可用,但我需要圖像作爲背景,而不是html標籤。 它可能是什麼?
上的CSS填充類:
.fill {
width:100%;
height:100%;
background-position: center;
background-size: cover;
}
你可以嘗試將寬度和高度從100%改爲100px,看看它是否有效? –