转盘指示灯不起作用

时间:2016-07-08 09:12:47

标签: javascript jquery carousel

我制作了一张带有6张照片的旋转木马,但下面的旋转木马指示灯不起作用。只有前三个旋转木马指示灯,当点击时,带我到正确的幻灯片(点击第一个指示器带我到第一个幻灯片)。单击最后三个指示符导致轮播没有变化。我哪里错了?

<div class="container">
        <div class="row">
            <div class="col-md-12">
                <div class="carousel slide" data-ride="carousel" id="carousel">
                    <ol class="carousel-indicators">
                        <li data-target="#carousel" data-slide-to="0" class="active"></li>
                        <li data-target="#carousel" data-slide-to="1"></li>
                        <li data-target="#carousel" data-slide-to="2"></li>
                        <li data-target="#carousel" data-slise-to="3"></li>
                        <li data-target="#carousel" data-slise-to="4"></li>
                        <li data-target="#carousel" data-slise-to="5"></li>
                        <li data-target="#carousel" data-slise-to="6"></li>
                    </ol>
                    <div class="carousel-inner">
                        <div class="item active">
                            <div class="row-fluid">
                                <img src="nico-rosberg.jpg" class="cimg">
                                <img src="Taking%20control.png" class="cimg2">
                            </div>
                            <div class="carousel-caption">
                                <h1>Race info to go here</h1>
                            </div>
                        </div>
                        <div class="item">
                            <div class="row-fluid">
                                <img src="nico-rosberg.jpg" class="cimg">
                                <img src="smile.png" class="cimg2">
                            </div>
                            <div class="carousel-caption">

                            </div>
                        </div>
                        <div class="item">
                            <div class="row-fluid">
                                <img src="nico-rosberg.jpg" class="cimg">
                                <img src="question-mark.png" class="cimg2">
                            </div>
                            <div class="carousel-caption">

                            </div>
                        </div>
                        <div class="item">
                            <div class="row-fluid">
                                <img src="nico-rosberg.jpg" class="cimg">
                                <img src="pulp%20fiction.jpg" class="cimg2">
                            </div>
                            <div class="carousel-caption">

                            </div>
                        </div>
                        <div class="item">
                            <div class="row-fluid">
                                <img src="max.jpg" class="cimg">
                                <img src="look%20to%20your%20left.jpg" class="cimg2">
                            </div>
                            <div class="carousel-caption">

                            </div>
                        </div>
                        <div class="item">
                            <div class="row-fluid">
                                <img src="lewis-hamilton.jpg" class="cimg">
                                <img src="le%20Ferrari.jpg" class="cimg2">
                            </div>
                            <div class="carousel-caption">

                            </div>
                        </div>
                    </div>
                </div>
            </div>

1 个答案:

答案 0 :(得分:1)

您有拼写错误:使用data-slide-to代替data-slise-to

<div class="container">
    <div class="row">
        <div class="col-md-12">
            <div class="carousel slide" data-ride="carousel" id="carousel">
                <ol class="carousel-indicators">
                    <li data-target="#carousel" data-slide-to="0" class="active"></li>
                    <li data-target="#carousel" data-slide-to="1"></li>
                    <li data-target="#carousel" data-slide-to="2"></li>
                    <li data-target="#carousel" data-slide-to="3"></li>
                    <li data-target="#carousel" data-slide-to="4"></li>
                    <li data-target="#carousel" data-slide-to="5"></li>
                    <li data-target="#carousel" data-slide-to="6"></li>
                </ol>
                <div class="carousel-inner">
                    <div class="item active">
                        <div class="row-fluid">
                            <img src="nico-rosberg.jpg" class="cimg">
                            <img src="Taking%20control.png" class="cimg2">
                        </div>
                        <div class="carousel-caption">
                            <h1>Race info to go here</h1>
                        </div>
                    </div>
                    <div class="item">
                        <div class="row-fluid">
                            <img src="nico-rosberg.jpg" class="cimg">
                            <img src="smile.png" class="cimg2">
                        </div>
                        <div class="carousel-caption">

                        </div>
                    </div>
                    <div class="item">
                        <div class="row-fluid">
                            <img src="nico-rosberg.jpg" class="cimg">
                            <img src="question-mark.png" class="cimg2">
                        </div>
                        <div class="carousel-caption">

                        </div>
                    </div>
                    <div class="item">
                        <div class="row-fluid">
                            <img src="nico-rosberg.jpg" class="cimg">
                            <img src="pulp%20fiction.jpg" class="cimg2">
                        </div>
                        <div class="carousel-caption">

                        </div>
                    </div>
                    <div class="item">
                        <div class="row-fluid">
                            <img src="max.jpg" class="cimg">
                            <img src="look%20to%20your%20left.jpg" class="cimg2">
                        </div>
                        <div class="carousel-caption">

                        </div>
                    </div>
                    <div class="item">
                        <div class="row-fluid">
                            <img src="lewis-hamilton.jpg" class="cimg">
                            <img src="le%20Ferrari.jpg" class="cimg2">
                        </div>
                        <div class="carousel-caption">

                        </div>
                    </div>
                </div>
            </div>
        </div>