1

我有一个 bxslider,当它们没有足够的幻灯片使其滑动时,它是页面的全宽让它们居中,因​​为 bxsliders 包装器宽度比屏幕宽度大很多。任何帮助,将不胜感激。

            <div class="next-speakers">
                <h1>Next Event Speakers</h1>
                <div class="speakers">
                    <?php query_posts(array( 'post_type' => 'events','meta_key' => 'date','orderby' => 'meta_value_num','order' => 'DESC' ) );?>
                    <?php while (have_posts()) : the_post();?>
                    <?php $eventid = get_the_ID();?>
                    <?php $date = DateTime::createFromFormat('Ymd', get_field('date'));?>
                    <?php $currentdate = new DateTime();?>
                    <?php if ($date > $currentdate) { ?>

                    <ul class="speaker-thumb-slider">
                        <?php
                        $speakers = get_field('speakers');
                        if( $speakers ): ?>
                        <?php foreach( $speakers as $speaker): ?>
                        <li class="speaker-thumb" data-info="<?php echo get_the_title( $speaker->ID ); ?> - <span class='italic'><?php $a = get_field('speaker_topic', $speaker->ID); echo $a[0]['topic']; ?></span>">
                            <img src="<?php the_field('speakers_image',$speaker->ID); ?>" /><div class="arrow-down"></div>
                        </li><!-- speakers thumb end -->
                        <?php endforeach; ?>
                        <?php endif; ?>
                    </ul><!-- speakers thumb slider end -->
                    <?php } ?>
                    <?php endwhile;?>
                </div><!-- speakers end -->
                <div class="speaker-info-wrap"><p><span class="italic">Hover over a speaker for more information.</span></p></div>
            </div><!-- next speakers end -->
4

0 回答 0