mirror of
https://github.com/twbs/bootstrap.git
synced 2024-12-13 01:08:58 +01:00
way cooler carousel example, along with updated screenshots for examples
This commit is contained in:
parent
7ea4783df8
commit
fe4a2d2c96
166
carousel.html
166
carousel.html
@ -11,9 +11,38 @@
|
||||
<link href="../assets/css/bootstrap.css" rel="stylesheet">
|
||||
<style type="text/css">
|
||||
body {
|
||||
padding-top: 20px;
|
||||
padding-bottom: 40px;
|
||||
}
|
||||
|
||||
.navbar-wrapper {
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
margin-top: 20px;
|
||||
margin-bottom: -85px;
|
||||
}
|
||||
.carousel-custom {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
.carousel-custom .container {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
.carousel-custom .carousel-caption {
|
||||
background-color: transparent;
|
||||
position: static;
|
||||
max-width: 50%;
|
||||
padding: 0;
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
.carousel-custom .carousel-caption h1,
|
||||
.carousel-custom .carousel-caption .lead {
|
||||
margin: 0;
|
||||
line-height: 1.25;
|
||||
color: #fff;
|
||||
text-shadow: 0 1px 3px rgba(0,0,0,.4);
|
||||
}
|
||||
</style>
|
||||
<link href="../assets/css/bootstrap-responsive.css" rel="stylesheet">
|
||||
|
||||
@ -32,86 +61,94 @@
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="navbar">
|
||||
<div class="container navbar-wrapper">
|
||||
<div class="navbar navbar-inverse">
|
||||
<div class="navbar-inner">
|
||||
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</a>
|
||||
<a class="brand" href="#">Project name</a>
|
||||
<div class="nav-collapse collapse">
|
||||
<ul class="nav">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li><a href="#about">About</a></li>
|
||||
<li><a href="#contact">Contact</a></li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Action</a></li>
|
||||
<li><a href="#">Another action</a></li>
|
||||
<li><a href="#">Something else here</a></li>
|
||||
<li class="divider"></li>
|
||||
<li class="nav-header">Nav header</li>
|
||||
<li><a href="#">Separated link</a></li>
|
||||
<li><a href="#">One more separated link</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.container -->
|
||||
|
||||
|
||||
<!-- Carousel -->
|
||||
<div id="myCarousel" class="carousel slide carousel-custom">
|
||||
<div class="carousel-inner">
|
||||
<div class="item active">
|
||||
<img src="http://placehold.it/2000x700" alt="">
|
||||
<div class="container">
|
||||
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</a>
|
||||
<a class="brand" href="#">Project name</a>
|
||||
<div class="nav-collapse collapse">
|
||||
<ul class="nav">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li><a href="#about">About</a></li>
|
||||
<li><a href="#contact">Contact</a></li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Action</a></li>
|
||||
<li><a href="#">Another action</a></li>
|
||||
<li><a href="#">Something else here</a></li>
|
||||
<li class="divider"></li>
|
||||
<li class="nav-header">Nav header</li>
|
||||
<li><a href="#">Separated link</a></li>
|
||||
<li><a href="#">One more separated link</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Carousel -->
|
||||
<div id="myCarousel" class="carousel slide">
|
||||
<div class="carousel-inner">
|
||||
<div class="item active">
|
||||
<img src="http://placehold.it/1170x500" alt="">
|
||||
<div class="carousel-caption">
|
||||
<h4>First Thumbnail label</h4>
|
||||
<p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="http://placehold.it/1170x500" alt="">
|
||||
<div class="carousel-caption">
|
||||
<h4>Second Thumbnail label</h4>
|
||||
<p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="http://placehold.it/1170x500" alt="">
|
||||
<div class="carousel-caption">
|
||||
<h4>Third Thumbnail label</h4>
|
||||
<p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
|
||||
<h1>First Thumbnail label</h1>
|
||||
<p class="lead">Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="http://placehold.it/2000x700" alt="">
|
||||
<div class="container">
|
||||
<div class="carousel-caption">
|
||||
<h1>Second Thumbnail label</h1>
|
||||
<p class="lead">Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="http://placehold.it/2000x700" alt="">
|
||||
<div class="container">
|
||||
<div class="carousel-caption">
|
||||
<h1>Third Thumbnail label</h1>
|
||||
<p class="lead">Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a class="left carousel-control" href="#myCarousel" data-slide="prev">‹</a>
|
||||
<a class="right carousel-control" href="#myCarousel" data-slide="next">›</a>
|
||||
</div>
|
||||
<a class="left carousel-control" href="#myCarousel" data-slide="prev">‹</a>
|
||||
<a class="right carousel-control" href="#myCarousel" data-slide="next">›</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="container">
|
||||
|
||||
<!-- Example row of columns -->
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<img class="thumbnail" src="http://placehold.it/370x185">
|
||||
<img src="http://placehold.it/370x200">
|
||||
<h2>Heading</h2>
|
||||
<p>Donec sed odio dui. Etiam porta sem malesuada magna mollis euismod. Nullam id dolor id nibh ultricies vehicula ut id elit. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.</p>
|
||||
<p><a class="btn" href="#">View details »</a></p>
|
||||
</div>
|
||||
<div class="span4">
|
||||
<img class="thumbnail" src="http://placehold.it/370x185">
|
||||
<img src="http://placehold.it/370x200">
|
||||
<h2>Heading</h2>
|
||||
<p>Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.</p>
|
||||
<p><a class="btn" href="#">View details »</a></p>
|
||||
</div>
|
||||
<div class="span4">
|
||||
<img class="thumbnail" src="http://placehold.it/370x185">
|
||||
<img src="http://placehold.it/370x200">
|
||||
<h2>Heading</h2>
|
||||
<p>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Cras mattis consectetur purus sit amet fermentum.</p>
|
||||
<p><a class="btn" href="#">View details »</a></p>
|
||||
@ -142,6 +179,13 @@
|
||||
<script src="../assets/js/bootstrap-collapse.js"></script>
|
||||
<script src="../assets/js/bootstrap-carousel.js"></script>
|
||||
<script src="../assets/js/bootstrap-typeahead.js"></script>
|
||||
|
||||
<script>
|
||||
!function ($) {
|
||||
$(function(){
|
||||
// carousel demo
|
||||
$('#myCarousel').carousel()
|
||||
})
|
||||
}(window.jQuery)
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user