本文整理汇总了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>