我是bootstrap 3的新手,并为我的网站开发了Carousel。 我需要创建一个具有“淡入淡出”效果的旋转木马和旋转木马下方的4个按钮,点击这些按钮会触发图像之间的过渡。我不想使用bootstrap API提供的默认控件(左/右箭头和指示符)。
我想创造这样的东西 - https://moodle.org/
到目前为止,这是我的代码 -
<!DOCTYPE html>
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>Carousel Template for Bootstrap</title>
<link href="http://getbootstrap.com/dist/css/bootstrap.css" rel="stylesheet">
<link href="carousel.css" rel="stylesheet">
</head>
<body style="padding-left: 50px;padding-right: 50px;">
<div id="myCarousel" data-interval="false" class="carousel slide" data-ride="carousel" >
<div class="carousel-inner">
<div class="item active">
<img alt="First slide" src="1.jpg">
<div class="container">
<div class="carousel-caption">
<h1>Example headline.</h1>
</div>
</div>
</div>
<div class="item">
<img alt="Second slide" src="1.jpg">
<div class="container">
<div class="carousel-caption">
<h1>Another example headline.</h1>
</div>
</div>
</div>
<div class="item">
<img alt="Third slide" src="1.jpg">
<div class="container">
<div class="carousel-caption">
<h1>One more for good measure.</h1>
</div>
</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 -->
<div align="center">
<p>Carousel with auto-slide disabled!</p>
</div>
<!-- FOOTER -->
<footer>
<p class="pull-right"><a href="http://getbootstrap.com/examples/carousel/#">Back to top</a></p>
<p>© 2014 Company, Inc. · <a href="http://getbootstrap.com/examples/carousel/#">Privacy</a> · <a href="http://getbootstrap.com/examples/carousel/#">Terms</a></p>
</footer>
</div><!-- /.container -->
<script src="./Carousel Template for Bootstrap_files/jquery.min.js"></script>
<script src="./Carousel Template for Bootstrap_files/bootstrap.min.js"></script>
<script src="./Carousel Template for Bootstrap_files/docs.min.js"></script>
</body></html>
答案 0 :(得分:2)