Skip to content

Instantly share code, notes, and snippets.

@dsebao
Last active July 17, 2017 21:30
Show Gist options
  • Save dsebao/7a9e25eed793dd61959fc31065ee8cc5 to your computer and use it in GitHub Desktop.
Save dsebao/7a9e25eed793dd61959fc31065ee8cc5 to your computer and use it in GitHub Desktop.
Bootstrap Carousel fade effect CSS3
.carousel-fade {
.carousel-inner {
.item {
transition-property: opacity;
}
.item,
.active.left,
.active.right {
opacity: 0;
}
.active,
.next.left,
.prev.right {
opacity: 1;
}
.next,
.prev,
.active.left,
.active.right {
left: 0;
transform: translate3d(0, 0, 0);
}
}
.carousel-control {
z-index: 2;
}
}
html,
body,
.carousel,
.carousel-inner,
.carousel-inner .item {
height: 100%;
}
.item:nth-child(1) {
background: #74C390;
}
.item:nth-child(2) {
background: #51BCE8;
}
.item:nth-child(3) {
background: #E46653;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment