輪播圖切換不正常
老師,在保證引入css和腳本無(wú)誤的情況下,我按照視頻的教法寫出來(lái)的輪播圖代碼是有問(wèn)題的,輪播圖的左右切換按鈕是無(wú)法實(shí)現(xiàn)點(diǎn)擊切換功能的,但是輪播圖又可以自主切換。請(qǐng)老師幫我看看問(wèn)題出在哪里可以嗎?
<!-- 廣告輪播 -->
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
? ? <li date-target="#carousel-example-generic" date-side-to="0" class="active"></li>
? ? ? ? <li date-target="#carousel-example-generic" date-side-to="1"></li>
? ? ? ? <li date-target="#carousel-example-generic" date-side-to="2"></li>
? ? ? ? <li date-target="#carousel-example-generic" date-side-to="3"></li>
? ? ? ? <li date-target="#carousel-example-generic" date-side-to="4"></li>
? ? </ol>
? ? <div class="carousel-inner" role="listbox">
? ? <div class="item active">
? ? ? ? <img src="images/chrome-big.jpg">
? ? ? ? ? ? <div class="carousel-caption">
? ? ? ? ? ? <h1>chrome</h1>
? ? ? ? ? ? ? ? <p>Google Chrome是一款快速、簡(jiǎn)單且安全的網(wǎng)絡(luò)瀏覽器,能很好地滿足新型網(wǎng)站對(duì)瀏覽器的要求。</p>
? ? ? ? ? ? ? ? <p><a href="#" class="btn btn-lg btn-primary" role="button" target="_blank">點(diǎn)擊下載</a></p>
? ? ? ? ? ? </div>
? ? ? ? </div>
? ? ? ? <div class="item">
? ? ? ? <img src="images/firefox-big.jpg">
? ? ? ? ? ? <div class="carousel-caption">
? ? ? ? ? ? <h1>Firefox</h1>
? ? ? ? ? ? ? ? <p>Firefox是一款快速、簡(jiǎn)單且安全的網(wǎng)絡(luò)瀏覽器,能很好地滿足新型網(wǎng)站對(duì)瀏覽器的要求。</p>
? ? ? ? ? ? ? ? <p><a href="#" class="btn btn-lg btn-primary" role="button" target="_blank">點(diǎn)擊下載</a></p>
? ? ? ? ? ? </div>
? ? ? ? </div>
? ? ? ? <div class="item">
? ? ? ? <img src="images/opera-big.jpg">
? ? ? ? ? ? <div class="carousel-caption">
? ? ? ? ? ? <h1>Opera</h1>
? ? ? ? ? ? ? ? <p>Opera是一款快速、簡(jiǎn)單且安全的網(wǎng)絡(luò)瀏覽器,能很好地滿足新型網(wǎng)站對(duì)瀏覽器的要求。</p>
? ? ? ? ? ? ? ? <p><a href="#" class="btn btn-lg btn-primary" role="button" target="_blank">點(diǎn)擊下載</a></p>
? ? ? ? ? ? </div>
? ? ? ? </div>
? ? ? ? <div class="item">
? ? ? ? <img src="images/safari-big.jpg">
? ? ? ? ? ? <div class="carousel-caption">
? ? ? ? ? ? <h1>Safari</h1>
? ? ? ? ? ? ? ? <p>Safari是一款快速、簡(jiǎn)單且安全的網(wǎng)絡(luò)瀏覽器,能很好地滿足新型網(wǎng)站對(duì)瀏覽器的要求。</p>
? ? ? ? ? ? ? ? <p><a href="#" class="btn btn-lg btn-primary" role="button" target="_blank">點(diǎn)擊下載</a></p>
? ? ? ? ? ? </div>
? ? ? ? </div>
? ? ? ? <div class="item">
? ? ? ? <img src="images/ie-big.jpg">
? ? ? ? ? ? <div class="carousel-caption">
? ? ? ? ? ? <h1>IE</h1>
? ? ? ? ? ? ? ? <p>IE是一款快速、簡(jiǎn)單且安全的網(wǎng)絡(luò)瀏覽器,能很好地滿足新型網(wǎng)站對(duì)瀏覽器的要求。</p>
? ? ? ? ? ? ? ? <p><a href="#" class="btn btn-lg btn-primary" role="button" target="_blank">點(diǎn)擊下載</a></p>
? ? ? ? ? ? </div>
? ? ? ? </div>
? ? </div>
? ? <a class="left carousel-control" role="button" data-side="prev" href="#carousel-example-generic">
? ? <span class="glyphicon glyphicon-chevron-left"></span>
? ? ? ? <span class="sr-only">Prev</span>
? ? </a>
? ? <a href="#carousel-example-generic" class="right carousel-control" role="button" data-side="next">
? ? ? ? <span class="glyphicon glyphicon-chevron-right"></span>
? ? ? ? <span class="sr-only">Next</span>
? ? </a>
</div>
2016-01-07
有兩個(gè)問(wèn)題:
1,你將data-target寫成了date-target
2,你將date-slide-to寫成了date-side-to,這里涉及小圓點(diǎn)和下面的前一頁(yè)、后一頁(yè)