1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-30 08:39:56 +02:00

Add @supports feature query for Carousel CSS 3D transforms; fixes #15534 (#19751)

[skip sauce]
[skip validator]
This commit is contained in:
Chris Rebert
2016-11-25 14:51:55 -08:00
committed by Mark Otto
parent 3cfd40782c
commit 3593ee85c1
4 changed files with 47 additions and 3 deletions

View File

@@ -5827,7 +5827,36 @@ button.close {
line-height: 1;
}
@media all and (transform-3d), (-webkit-transform-3d) {
@media (-webkit-transform-3d) {
.carousel-inner > .carousel-item {
-webkit-transition: -webkit-transform .6s ease-in-out;
transition: -webkit-transform .6s ease-in-out;
-o-transition: transform .6s ease-in-out, -o-transform .6s ease-in-out;
transition: transform .6s ease-in-out;
transition: transform .6s ease-in-out, -webkit-transform .6s ease-in-out, -o-transform .6s ease-in-out;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
-webkit-perspective: 1000px;
perspective: 1000px;
}
.carousel-inner > .carousel-item.next, .carousel-inner > .carousel-item.active.right {
left: 0;
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
}
.carousel-inner > .carousel-item.prev, .carousel-inner > .carousel-item.active.left {
left: 0;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
.carousel-inner > .carousel-item.next.left, .carousel-inner > .carousel-item.prev.right, .carousel-inner > .carousel-item.active {
left: 0;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@supports ((-webkit-transform: translate3d(0, 0, 0)) or (transform: translate3d(0, 0, 0))) {
.carousel-inner > .carousel-item {
-webkit-transition: -webkit-transform .6s ease-in-out;
transition: -webkit-transform .6s ease-in-out;