Php 如何使用Fancybox 3创建内联元素库?

Php 如何使用Fancybox 3创建内联元素库?,php,html,fancybox,fancybox-3,Php,Html,Fancybox,Fancybox 3,我正试图用Fancybox 3创建一个内联元素库。我已经让各个弹出窗口正常工作了,现在我试图找出如何利用Fancybox默认导航行为让用户能够循环浏览弹出窗口元素 这是我的密码: <ul id="testiFeed" class="list-unstyled"> <?php $args = array( 'post_type' => 'testimon

我正试图用Fancybox 3创建一个内联元素库。我已经让各个弹出窗口正常工作了,现在我试图找出如何利用Fancybox默认导航行为让用户能够循环浏览弹出窗口元素

这是我的密码:

<ul id="testiFeed" class="list-unstyled">
                            <?php 
                                $args = array( 'post_type' => 'testimonial', 'posts_per_page' => 9 );
                                $loop = new WP_Query( $args );
                                $i = 1;
                                while ( $loop->have_posts() ) : $loop->the_post(); ?>

                                  <li>
                                    <div class="testiPadding">
                                        <a data-fancybox data-src="#hidden-content-<?php echo $i ?>" href="javascript:;">
                                            <div class="testiBox" style="background-image: url(<?php the_post_thumbnail_url('medium_large'); ?>);">
                                                <p class="testiUser">@<?php the_field('instagram_username'); ?></p>
                                                <div class="testiCover"></div>
                                            </div>
                                        </a>
                                    </div>
                                  </li>

                                  <div class="testiPopup" style="display: none;" id="hidden-content-<?php echo $i ?>">
                                    <div class="testiRow">
                                        <div class="testiHalf testiFeature" style="background-image: url(<?php the_post_thumbnail_url('large'); ?>);">

                                        </div>
                                        <div class="testiHalf testiRight">
                                            <div class="testiAuthor">
                                                <div class="testiProfile" style="background-image: url(<?php the_field('user_photo'); ?>);"></div>
                                                <h2><?php the_title(); ?></h2>
                                                <p><em><i class="fa fa-instagram"></i> @<?php the_field('instagram_username'); ?></em></p>
                                            </div>
                                            <div class="testiContent">
                                                <?php the_content(); ?>
                                            </div>
                                            <div class="testiShare">
                                                <p>Share <a href="#"><i class="fa fa-facebook"></i></a> <a href="#"><i class="fa fa-twitter"></i></a> <a href="#"><i class="fa fa-pinterest"></i></a></p>
                                            </div>
                                        </div>
                                    </div>
                                  </div>

                                <?php $i++; endwhile;
                            ?>
                        </ul>

  • 数据fancybox
    添加相同的值应该可以很好地工作-很好,键盘导航现在可以工作了,但仍然没有箭头。位于的文档将默认行为显示为“true”,但我看不到箭头,并且我的控制台中没有错误。想法?您正在使用fancyBox v3.1吗?