mirror of
https://github.com/twbs/bootstrap.git
synced 2022-11-09 12:25:43 -05:00
b648a77ed3
Conflicts: Gruntfile.js _config.yml dist/css/bootstrap-theme.css dist/css/bootstrap-theme.min.css dist/css/bootstrap.css dist/css/bootstrap.css.map dist/css/bootstrap.min.css dist/fonts/glyphicons-halflings-regular.eot dist/fonts/glyphicons-halflings-regular.svg dist/fonts/glyphicons-halflings-regular.ttf dist/fonts/glyphicons-halflings-regular.woff docs/_data/glyphicons.yml docs/_includes/components/alerts.html docs/_includes/components/badges.html docs/_includes/components/button-dropdowns.html docs/_includes/components/button-groups.html docs/_includes/components/dropdowns.html docs/_includes/components/glyphicons.html docs/_includes/components/input-groups.html docs/_includes/components/labels.html docs/_includes/components/media.html docs/_includes/components/navbar.html docs/_includes/components/navs.html docs/_includes/components/pagination.html docs/_includes/components/panels.html docs/_includes/components/progress-bars.html docs/_includes/css/buttons.html docs/_includes/css/forms.html docs/_includes/css/grid.html docs/_includes/css/helpers.html docs/_includes/css/images.html docs/_includes/css/less.html docs/_includes/css/responsive-utilities.html docs/_includes/css/sass.html docs/_includes/css/tables.html docs/_includes/css/type.html docs/_includes/getting-started/accessibility.html docs/_includes/getting-started/browser-device-support.html docs/_includes/getting-started/community.html docs/_includes/getting-started/download.html docs/_includes/getting-started/examples.html docs/_includes/getting-started/whats-included.html docs/_includes/js/affix.html docs/_includes/js/alerts.html docs/_includes/js/buttons.html docs/_includes/js/carousel.html docs/_includes/js/collapse.html docs/_includes/js/dropdowns.html docs/_includes/js/modal.html docs/_includes/js/overview.html docs/_includes/js/tabs.html docs/_includes/nav/components.html docs/_includes/nav/css.html docs/_includes/nav/javascript.html docs/_includes/nav/main.html docs/about.html docs/assets/css/docs.min.css docs/assets/js/customize.min.js docs/assets/js/raw-files.min.js docs/dist/css/bootstrap-theme.css docs/dist/css/bootstrap-theme.min.css docs/dist/css/bootstrap.css docs/dist/css/bootstrap.css.map docs/dist/css/bootstrap.min.css docs/dist/fonts/glyphicons-halflings-regular.eot docs/dist/fonts/glyphicons-halflings-regular.svg docs/dist/fonts/glyphicons-halflings-regular.ttf docs/dist/fonts/glyphicons-halflings-regular.woff docs/examples/carousel/index.html docs/examples/navbar-fixed-top/index.html docs/examples/navbar-static-top/index.html docs/examples/navbar/index.html docs/examples/non-responsive/index.html docs/examples/non-responsive/non-responsive.css docs/examples/sticky-footer-navbar/index.html docs/examples/theme/index.html fonts/glyphicons-halflings-regular.eot fonts/glyphicons-halflings-regular.svg fonts/glyphicons-halflings-regular.ttf fonts/glyphicons-halflings-regular.woff less/_carousel.less less/_forms.less less/glyphicons.less
250 lines
4.7 KiB
Text
250 lines
4.7 KiB
Text
//
|
|
// Carousel
|
|
// --------------------------------------------------
|
|
|
|
|
|
// Wrapper for the slide container and indicators
|
|
.carousel {
|
|
position: relative;
|
|
}
|
|
|
|
.carousel-inner {
|
|
position: relative;
|
|
overflow: hidden;
|
|
width: 100%;
|
|
|
|
> .item {
|
|
display: none;
|
|
position: relative;
|
|
transition: .6s ease-in-out left;
|
|
|
|
// Account for jankitude on images
|
|
> img,
|
|
> a > img {
|
|
&:extend(.img-responsive);
|
|
line-height: 1;
|
|
}
|
|
|
|
// WebKit CSS3 transforms for supported devices
|
|
@media all and (transform-3d), (-webkit-transform-3d) {
|
|
.transition-transform(~'0.6s ease-in-out');
|
|
.backface-visibility(~'hidden');
|
|
.perspective(1000);
|
|
|
|
&.next,
|
|
&.active.right {
|
|
.translate3d(100%, 0, 0);
|
|
left: 0;
|
|
}
|
|
&.prev,
|
|
&.active.left {
|
|
.translate3d(-100%, 0, 0);
|
|
left: 0;
|
|
}
|
|
&.next.left,
|
|
&.prev.right,
|
|
&.active {
|
|
.translate3d(0, 0, 0);
|
|
left: 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
> .active,
|
|
> .next,
|
|
> .prev {
|
|
display: block;
|
|
}
|
|
|
|
> .active {
|
|
left: 0;
|
|
}
|
|
|
|
> .next,
|
|
> .prev {
|
|
position: absolute;
|
|
top: 0;
|
|
width: 100%;
|
|
}
|
|
|
|
> .next {
|
|
left: 100%;
|
|
}
|
|
> .prev {
|
|
left: -100%;
|
|
}
|
|
> .next.left,
|
|
> .prev.right {
|
|
left: 0;
|
|
}
|
|
|
|
> .active.left {
|
|
left: -100%;
|
|
}
|
|
> .active.right {
|
|
left: 100%;
|
|
}
|
|
|
|
}
|
|
|
|
// Left/right controls for nav
|
|
// ---------------------------
|
|
|
|
.carousel-control {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
bottom: 0;
|
|
width: @carousel-control-width;
|
|
opacity: @carousel-control-opacity;
|
|
font-size: @carousel-control-font-size;
|
|
color: @carousel-control-color;
|
|
text-align: center;
|
|
text-shadow: @carousel-text-shadow;
|
|
// We can't have this transition here because WebKit cancels the carousel
|
|
// animation if you trip this while in the middle of another animation.
|
|
|
|
// Set gradients for backgrounds
|
|
&.left {
|
|
#gradient > .horizontal(@start-color: rgba(0,0,0,.5); @end-color: rgba(0,0,0,.0001));
|
|
}
|
|
&.right {
|
|
left: auto;
|
|
right: 0;
|
|
#gradient > .horizontal(@start-color: rgba(0,0,0,.0001); @end-color: rgba(0,0,0,.5));
|
|
}
|
|
|
|
// Hover/focus state
|
|
&:hover,
|
|
&:focus {
|
|
outline: 0;
|
|
color: @carousel-control-color;
|
|
text-decoration: none;
|
|
opacity: .9;
|
|
}
|
|
|
|
// Toggles
|
|
.icon-prev,
|
|
.icon-next {
|
|
position: absolute;
|
|
top: 50%;
|
|
z-index: 5;
|
|
display: inline-block;
|
|
width: 20px;
|
|
height: 20px;
|
|
margin-top: -10px;
|
|
font-family: serif;
|
|
line-height: 1;
|
|
}
|
|
.icon-prev {
|
|
left: 50%;
|
|
margin-left: -10px;
|
|
}
|
|
.icon-next {
|
|
right: 50%;
|
|
margin-right: -10px;
|
|
}
|
|
.icon-prev {
|
|
&:before {
|
|
content: '\2039';// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039)
|
|
}
|
|
}
|
|
.icon-next {
|
|
&:before {
|
|
content: '\203a';// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A)
|
|
}
|
|
}
|
|
}
|
|
|
|
// Optional indicator pips
|
|
//
|
|
// Add an unordered list with the following class and add a list item for each
|
|
// slide your carousel holds.
|
|
|
|
.carousel-indicators {
|
|
position: absolute;
|
|
bottom: 10px;
|
|
left: 50%;
|
|
z-index: 15;
|
|
width: 60%;
|
|
margin-left: -30%;
|
|
padding-left: 0;
|
|
list-style: none;
|
|
text-align: center;
|
|
|
|
li {
|
|
display: inline-block;
|
|
width: 10px;
|
|
height: 10px;
|
|
margin: 1px;
|
|
text-indent: -999px;
|
|
border: 1px solid @carousel-indicator-border-color;
|
|
border-radius: 10px;
|
|
cursor: pointer;
|
|
|
|
// IE9 hack for event handling
|
|
//
|
|
// Internet Explorer 9 does not support clicks on elements without a set
|
|
// `background-color`. We cannot use `filter` since that's not viewed as a
|
|
// background color by the browser. Thus, a hack is needed.
|
|
background-color: rgba(0,0,0,0); // IE9
|
|
}
|
|
.active {
|
|
margin: 0;
|
|
width: 12px;
|
|
height: 12px;
|
|
background-color: @carousel-indicator-active-bg;
|
|
}
|
|
}
|
|
|
|
// Optional captions
|
|
// -----------------------------
|
|
// Hidden by default for smaller viewports
|
|
.carousel-caption {
|
|
position: absolute;
|
|
left: 15%;
|
|
right: 15%;
|
|
bottom: 20px;
|
|
z-index: 10;
|
|
padding-top: 20px;
|
|
padding-bottom: 20px;
|
|
color: @carousel-caption-color;
|
|
text-align: center;
|
|
text-shadow: @carousel-text-shadow;
|
|
& .btn {
|
|
text-shadow: none; // No shadow for button elements in carousel-caption
|
|
}
|
|
}
|
|
|
|
|
|
// Scale up controls for tablets and up
|
|
.media-sm({
|
|
// Scale up the controls a smidge
|
|
.carousel-control {
|
|
.icon-prev,
|
|
.icon-next {
|
|
width: 30px;
|
|
height: 30px;
|
|
margin-top: -15px;
|
|
font-size: 30px;
|
|
}
|
|
.icon-prev {
|
|
margin-left: -15px;
|
|
}
|
|
.icon-next {
|
|
margin-right: -15px;
|
|
}
|
|
}
|
|
|
|
// Show and left align the captions
|
|
.carousel-caption {
|
|
left: 20%;
|
|
right: 20%;
|
|
padding-bottom: 30px;
|
|
}
|
|
|
|
// Move up the indicators
|
|
.carousel-indicators {
|
|
bottom: 20px;
|
|
}
|
|
});
|