info@54: // info@54: // Carousel info@54: // -------------------------------------------------- info@54: info@54: info@54: // Wrapper for the slide container and indicators info@54: .carousel { info@54: position: relative; info@54: } info@54: info@54: .carousel-inner { info@54: position: relative; info@54: overflow: hidden; info@54: width: 100%; info@54: info@54: > .item { info@54: display: none; info@54: position: relative; info@54: .transition(.6s ease-in-out left); info@54: info@54: // Account for jankitude on images info@54: > img, info@54: > a > img { info@54: .img-responsive(); info@54: line-height: 1; info@54: } info@54: } info@54: info@54: > .active, info@54: > .next, info@54: > .prev { display: block; } info@54: info@54: > .active { info@54: left: 0; info@54: } info@54: info@54: > .next, info@54: > .prev { info@54: position: absolute; info@54: top: 0; info@54: width: 100%; info@54: } info@54: info@54: > .next { info@54: left: 100%; info@54: } info@54: > .prev { info@54: left: -100%; info@54: } info@54: > .next.left, info@54: > .prev.right { info@54: left: 0; info@54: } info@54: info@54: > .active.left { info@54: left: -100%; info@54: } info@54: > .active.right { info@54: left: 100%; info@54: } info@54: info@54: } info@54: info@54: // Left/right controls for nav info@54: // --------------------------- info@54: info@54: .carousel-control { info@54: position: absolute; info@54: top: 0; info@54: left: 0; info@54: bottom: 0; info@54: width: @carousel-control-width; info@54: .opacity(@carousel-control-opacity); info@54: font-size: @carousel-control-font-size; info@54: color: @carousel-control-color; info@54: text-align: center; info@54: text-shadow: @carousel-text-shadow; info@54: // We can't have this transition here because WebKit cancels the carousel info@54: // animation if you trip this while in the middle of another animation. info@54: info@54: // Set gradients for backgrounds info@54: &.left { info@54: #gradient > .horizontal(@start-color: rgba(0,0,0,.5); @end-color: rgba(0,0,0,.0001)); info@54: } info@54: &.right { info@54: left: auto; info@54: right: 0; info@54: #gradient > .horizontal(@start-color: rgba(0,0,0,.0001); @end-color: rgba(0,0,0,.5)); info@54: } info@54: info@54: // Hover/focus state info@54: &:hover, info@54: &:focus { info@54: outline: none; info@54: color: @carousel-control-color; info@54: text-decoration: none; info@54: .opacity(.9); info@54: } info@54: info@54: // Toggles info@54: .icon-prev, info@54: .icon-next, info@54: .glyphicon-chevron-left, info@54: .glyphicon-chevron-right { info@54: position: absolute; info@54: top: 50%; info@54: z-index: 5; info@54: display: inline-block; info@54: } info@54: .icon-prev, info@54: .glyphicon-chevron-left { info@54: left: 50%; info@54: } info@54: .icon-next, info@54: .glyphicon-chevron-right { info@54: right: 50%; info@54: } info@54: .icon-prev, info@54: .icon-next { info@54: width: 20px; info@54: height: 20px; info@54: margin-top: -10px; info@54: margin-left: -10px; info@54: font-family: serif; info@54: } info@54: info@54: .icon-prev { info@54: &:before { info@54: content: '\2039';// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039) info@54: } info@54: } info@54: .icon-next { info@54: &:before { info@54: content: '\203a';// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A) info@54: } info@54: } info@54: } info@54: info@54: // Optional indicator pips info@54: // info@54: // Add an unordered list with the following class and add a list item for each info@54: // slide your carousel holds. info@54: info@54: .carousel-indicators { info@54: position: absolute; info@54: bottom: 10px; info@54: left: 50%; info@54: z-index: 15; info@54: width: 60%; info@54: margin-left: -30%; info@54: padding-left: 0; info@54: list-style: none; info@54: text-align: center; info@54: info@54: li { info@54: display: inline-block; info@54: width: 10px; info@54: height: 10px; info@54: margin: 1px; info@54: text-indent: -999px; info@54: border: 1px solid @carousel-indicator-border-color; info@54: border-radius: 10px; info@54: cursor: pointer; info@54: info@54: // IE8-9 hack for event handling info@54: // info@54: // Internet Explorer 8-9 does not support clicks on elements without a set info@54: // `background-color`. We cannot use `filter` since that's not viewed as a info@54: // background color by the browser. Thus, a hack is needed. info@54: // info@54: // For IE8, we set solid black as it doesn't support `rgba()`. For IE9, we info@54: // set alpha transparency for the best results possible. info@54: background-color: #000 \9; // IE8 info@54: background-color: rgba(0,0,0,0); // IE9 info@54: } info@54: .active { info@54: margin: 0; info@54: width: 12px; info@54: height: 12px; info@54: background-color: @carousel-indicator-active-bg; info@54: } info@54: } info@54: info@54: // Optional captions info@54: // ----------------------------- info@54: // Hidden by default for smaller viewports info@54: .carousel-caption { info@54: position: absolute; info@54: left: 15%; info@54: right: 15%; info@54: bottom: 20px; info@54: z-index: 10; info@54: padding-top: 20px; info@54: padding-bottom: 20px; info@54: color: @carousel-caption-color; info@54: text-align: center; info@54: text-shadow: @carousel-text-shadow; info@54: & .btn { info@54: text-shadow: none; // No shadow for button elements in carousel-caption info@54: } info@54: } info@54: info@54: info@54: // Scale up controls for tablets and up info@54: @media screen and (min-width: @screen-sm-min) { info@54: info@54: // Scale up the controls a smidge info@54: .carousel-control { info@54: .glyphicons-chevron-left, info@54: .glyphicons-chevron-right, info@54: .icon-prev, info@54: .icon-next { info@54: width: 30px; info@54: height: 30px; info@54: margin-top: -15px; info@54: margin-left: -15px; info@54: font-size: 30px; info@54: } info@54: } info@54: info@54: // Show and left align the captions info@54: .carousel-caption { info@54: left: 20%; info@54: right: 20%; info@54: padding-bottom: 30px; info@54: } info@54: info@54: // Move up the indicators info@54: .carousel-indicators { info@54: bottom: 20px; info@54: } info@54: }