迅睿CMS框架是一款PHP8高性能·简单易用的CMS开源开发框架,基于MIT开源许可协议发布,免费且不限制商业使用,是免费开源的产品,以万端互联为设计理念,支持的微信公众号、小程序、APP客户端、移动端网站、PC网站等多终端式管理系统。
联系官方销售客服
1835022288
028-61286886
使用Ftable做banner图 视频+图片这种混合的如何写代码呢
<?php $mysite=dr_site_value('hdtp');?> <?php if ($mysite) { $key=0; foreach ($mysite as $v) { ?> <div class="swiper-slide"> {if strpos($v, ".mp4") !== false} <video src="{dr_get_file($v[1])}" muted loop autoplay></video> {else} <img class="img" src="{dr_get_file($v[1])}" alt="{$v[2]}"> <img class="img2" src="" alt="{$v[2]}"> {/if} </div> <?php $key++; } } ?>
<div class="swiper-wrapper"> <div class="swiper-slide"> <video src="/uploadfile/202308/0462fed0e001ebb.mp4" muted loop autoplay></video> </div> <div class="swiper-slide"> <video src="/uploadfile/202308/007dcf0cc8a3694.mp4" muted loop autoplay></video> </div> <div class="swiper-slide"> <video src="/uploadfile/202308/17edbe7baccf264.jpg" muted loop autoplay></video> </div> <div class="swiper-slide"> <video src="/uploadfile/202308/dee803ec7343cfd.jpg" muted loop autoplay></video> </div
<?php $mysite=dr_site_value('hdtp');?> <?php if ($mysite) { $key=0; foreach ($mysite as $v) { ?> <div class="swiper-slide"> {if strpos(dr_get_file($v[1]), ".mp4") !== false} <video src="{dr_get_file($v[1])}" muted loop autoplay></video> {else} <img class="img" src="{dr_get_file($v[1])}" alt="{$v[2]}"> <img class="img2" src="" alt="{$v[2]}"> {/if} </div> <?php $key++; } } ?>