为什么不能实现自动轮播?

来源:3-5 滚动图片广告

慕慕4033758

2019-03-25 23:08

<!DOCTYPE html>

<html lang="zh-cn">

<head>

<meta charset="utf-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<meta name="viewport" content="width=device-width, initial-scale=1">

<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">

<title>Hello World</title>

<style>

.carousel {

height: 400px;

}

.carousel .item {

height: 400px;

}

.carousel .item img {

width: 100%;

}

</style>

</head>

<body>

<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">

<ol class="carousel-indicators">

<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>

<li data-target="#carousel-example-generic" data-slide-to="1"></li>

<li data-target="#carousel-example-generic" data-slide-to="2"></li>

</ol>

<div class="carousel-inner" role="listbox">

<div class="item active">

<img src="http://img.mukewang.com/5412ad400001e52014280484.jpg" alt="1 slide">

</div>

<div class="item">

<img src="http://img.mukewang.com/5412ad7c0001d2eb10880541.jpg" alt="2 slide">

</div>

<div class="item">

<img src="http://img.mukewang.com/5412ae5c0001653b12800644.jpg" alt="3 slide">

</div>

</div>

<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">

<span class="glyphicon glyphicon-chevron-left"></span>

<span class="sr-only">上一页</span>

</a>

<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">

<span class="glyphicon glyphicon-chevron-right"></span>

<span class="sr-only">下一页</span>

</a>

</div>

<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>

<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>

</body>

</html>


写回答 关注

1回答

  • 我有名字_玩玩
    2019-05-06 22:28:54

    大兄弟,你逗我呢?我还特地运行了一下

    谷歌,IE浏览器可以啊

基于bootstrap的网页开发

Bootstrap框架的基础教程,学会用Bootstrap前端框架搭建网页

187669 学习 · 734 问题

查看课程

相似问题