本文整理匯總了PHP中Photo::preload方法的典型用法代碼示例。如果您正苦於以下問題:PHP Photo::preload方法的具體用法?PHP Photo::preload怎麽用?PHP Photo::preload使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Photo
的用法示例。
在下文中一共展示了Photo::preload方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: url
<?php
Photo::preload($image_big, $image_small);
?>
<section class="project__block block-solution">
<div class="wrapper">
<div class="content-wrap">
<div class="block__left-text">Solution</div>
<div class="block__left-image">
@if (isset($image_big) && is_object($image_big))
<div style="background-image: url({{ $image_big->full() }});" class="image__item right-pos"></div>
@endif
</div>
<div class="block__right left-pad">
@if (isset($image_small) && is_object($image_small))
<div style="background-image: url({{ $image_small->full() }});" class="right__image"></div>
@endif
<div class="right__desc block-desc">
{{ $text }}
</div>
</div>
</div>
</div>
</section>
示例2: url
<?php
Photo::preload($image_1, $image_2);
?>
<section class="project__block block-half-images">
<div class="wrapper">
<div class="content-wrap">
<div class="block__image">
@if (isset($image_1) && is_object($image_1))
<div style="background-image: url({{ $image_1->full() }});" class="image__item right-pos"></div>
@endif
</div>
<div class="block__image">
@if (isset($image_2) && is_object($image_2))
<div style="background-image: url({{ $image_2->full() }});" class="image__item left-pos"></div>
@endif
</div>
</div>
</div>
</section>
示例3:
<?php
Photo::preload($image_1);
?>
<section class="project__block block-big-image">
<div class="wrapper">
@if (isset($image_1) && is_object($image_1))
<div class="content-wrap"><img src="{{ $image_1->full() }}" alt="" class="block__image"></div>
@endif
</div>
</section>
示例4: url
<?php
Photo::preload($image);
?>
<section class="project__block block-text-image">
<div class="wrapper">
<div class="content-wrap">
<div class="block__left right-pad">
<div class="block-title">Cross-branding</div>
<div class="block-desc">
{{ $text }}
</div>
</div>
<div class="block__image">
@if (isset($image) && is_object($image))
<div style="background-image: url({{ $image->full() }});" class="image__item left-pos"></div>
@endif
</div>
</div>
</div>
</section>