0

3张幻灯片后按“右”,页面变为白色。但是当你按下“左”,即转到上一张幻灯片时一切顺利,幻灯片正在改变。为什么按钮的工作方式不同(向右)会导致白屏?

<div class="container">
    <div id="myCarousel" class="carousel">
        <ol class="carousel-indicators">
            <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
            <li data-target="#myCarousel" data-slide-to="1"></li>
            <li data-target="#myCarousel" data-slide-to="2"></li>
        </ol>
        <div class="carousel-inner">
            <!--First slide-->
            <div class="item active">
                <img src="http://picsfab.com/download/image/26763/800x600_dogs-caravan.jpg" style="height: 100%; width: 100%; display: block;">
                <!--For text to be centered-->
                <div class="container">
                    <div class="carousel-caption">
                        <h1>It's my dogs. Welcome.</h1>
                        <p>This tag will container the text. 
                           This tag will container the text. 
                           This tag will container the text.
                        </p>
                        <p><a class="btn btn-sm btn-primary">Sign up</a></p>
                    </div>
                </div>
            </div>
            <!--Second slide-->
            <div class="item">
                <img src="http://picsfab.com/download/image/82752/800x600_yukon-dogs-cold-for-cats-canada-expedition.jpg" style="height: 100%; width: 100%; display: block;">
                <!--For text to be centered-->
                <div class="container">
                    <div class="carousel-caption">
                        <h1>It's my dogs. Welcome.</h1>
                        <p>This tag will container the text. 
                           This tag will container the text. 
                           This tag will container the text.
                        </p>
                        <p><a class="btn btn-sm btn-primary">Sign up</a></p>
                    </div>
                </div>
            </div>
                <!--Third slide-->
            <div class="item">
                <img src="http://picsfab.com/download/image/81152/800x600_sobaka-drug-wizard-dog.jpg" style="height: 100%; width: 100%; display: block;">
                <!--For text to be centered-->
                <div class="container">
                   <div class="carousel-caption">
                       <h1>It's my dogs. Welcome.</h1>
                       <p>This tag will container the text. 
                          This tag will container the text. 
                          This tag will container the text.
                       </p>
                       <p><a class="btn btn-sm btn-primary">Sign up</a></p>
                   </div>
                </div>
            </div>       

            <a class="left carousel-control" href="#myCarousel" data-slide="prev">
                <span class="glyphicon glyphicon-chevron-left"></span>
            </a>
            <a class="right carousel-control" href="#myCarousel" data-slide="next">
                <span class="glyphicon glyphicon-chevron-right"></span>
            </a>
        </div> <!--  Carousel inner-->
    </div> <!--  Carousel-->
</div>  <!--  Container-->
4

1 回答 1

0

所有作品!

        </div> <!--  Carousel inner-->
    <a class="left carousel-control" href="#myCarousel" data-slide="prev">
        <span class="glyphicon glyphicon-chevron-left"></span>
    </a>
    <a class="right carousel-control" href="#myCarousel" data-slide="next">
        <span class="glyphicon glyphicon-chevron-right"></span>
    </a>
于 2013-11-11T12:45:34.630 回答