1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-23 18:40:03 +00:00

Fixes #5616: scope carousel state classes to immediate children only

This commit is contained in:
Mark Otto 2012-11-28 02:17:50 -08:00
parent bf3a5df371
commit 296b838405
2 changed files with 28 additions and 28 deletions

View File

@ -5912,7 +5912,7 @@ a.badge:hover {
overflow: hidden; overflow: hidden;
} }
.carousel .item { .carousel > .item {
position: relative; position: relative;
display: none; display: none;
-webkit-transition: 0.6s ease-in-out left; -webkit-transition: 0.6s ease-in-out left;
@ -5921,46 +5921,46 @@ a.badge:hover {
transition: 0.6s ease-in-out left; transition: 0.6s ease-in-out left;
} }
.carousel .item > img { .carousel > .item > img {
display: block; display: block;
line-height: 1; line-height: 1;
} }
.carousel .active, .carousel > .active,
.carousel .next, .carousel > .next,
.carousel .prev { .carousel > .prev {
display: block; display: block;
} }
.carousel .active { .carousel > .active {
left: 0; left: 0;
} }
.carousel .next, .carousel > .next,
.carousel .prev { .carousel > .prev {
position: absolute; position: absolute;
top: 0; top: 0;
width: 100%; width: 100%;
} }
.carousel .next { .carousel > .next {
left: 100%; left: 100%;
} }
.carousel .prev { .carousel > .prev {
left: -100%; left: -100%;
} }
.carousel .next.left, .carousel > .next.left,
.carousel .prev.right { .carousel > .prev.right {
left: 0; left: 0;
} }
.carousel .active.left { .carousel > .active.left {
left: -100%; left: -100%;
} }
.carousel .active.right { .carousel > .active.right {
left: 100%; left: 100%;
} }

View File

@ -17,48 +17,48 @@
.carousel { .carousel {
.item { > .item {
display: none; display: none;
position: relative; position: relative;
.transition(.6s ease-in-out left); .transition(.6s ease-in-out left);
} }
// Account for jankitude on images // Account for jankitude on images
.item > img { > .item > img {
display: block; display: block;
line-height: 1; line-height: 1;
} }
.active, > .active,
.next, > .next,
.prev { display: block; } > .prev { display: block; }
.active { > .active {
left: 0; left: 0;
} }
.next, > .next,
.prev { > .prev {
position: absolute; position: absolute;
top: 0; top: 0;
width: 100%; width: 100%;
} }
.next { > .next {
left: 100%; left: 100%;
} }
.prev { > .prev {
left: -100%; left: -100%;
} }
.next.left, > .next.left,
.prev.right { > .prev.right {
left: 0; left: 0;
} }
.active.left { > .active.left {
left: -100%; left: -100%;
} }
.active.right { > .active.right {
left: 100%; left: 100%;
} }