我正在使用Bootstrap创建轮播。我的图片没有出现,但在旋转木马中使用的图标是appearing.Can,请谁来帮帮我。下面是我的bootstrap安装代码。
<!DOCTYPE html>
<html lang="en">
<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="yas.css">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Change100 community</title>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="js/html5shiv.min"></script>
<script src="js/respond.min.js"></script>
<![endif]-->
</head>
<body data-spy="scroll" data-target="#my-navbar">
<div class="container">
<section>
<div class="page-header" id="gallery">
<h2>Gallery <small></small></h2>
</div>
<div class="carousel slide" id="screenshot-carousel" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#screenshot-carousel" data-slide-to="0" class="active"></li>
<li data-target="#screenshot-carousel" data-slide-to="1"></li>
<li data-target="#screenshot-carousel" data-slide-to="2"></li>
<li data-target="#screenshot-carousel" data-slide-to="3"></li>
</ol>
<div class="carousel-inner">
<div class="item">
<img src="images/B.jpg" alt="this is the text for the image" class="active">
</div>
<div class="item">
<img src="images/2.jpg" alt="">
</div>
<div class="item">
<img src="images/d1.jpg" alt="">
</div>
<div class="item">
<img src="images/d.jpg" alt="">
</div>
</div><!--End carousel-inner-->
<a href="#screenshot-carousel" class="left carousel-control" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
</a>
<a href="#screenshot-carousel" class="right carousel-control" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
</div><!--End of carousel-->
</section>
</div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>发布于 2015-08-04 07:08:04
您应该从以下行更改活动类:
<img src="images/B.jpg" alt="this is the text for the image" class="active">要在div中,如下所示:
<div class="item active">
<img src="images/B.jpg" alt="this is the text for the image">
</div>https://stackoverflow.com/questions/31797763
复制相似问题