Last active
July 17, 2017 21:30
-
-
Save dsebao/7a9e25eed793dd61959fc31065ee8cc5 to your computer and use it in GitHub Desktop.
Bootstrap Carousel fade effect CSS3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .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