0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-17 09:52:29 +01:00

Offcanvas example: transition the transform (#28203)

This is more efficient than transitioning the `left` property.
This commit is contained in:
XhmikosR 2019-02-08 18:08:40 +02:00 committed by GitHub
parent 52e6ce4512
commit c56b10c147
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,13 +19,14 @@ body {
overflow-y: auto;
visibility: hidden;
background-color: #343a40;
transition-timing-function: ease-in-out;
transition-duration: .3s;
transition-property: left, visibility;
transition: visibility .3s ease-in-out, -webkit-transform .3s ease-in-out;
transition: transform .3s ease-in-out, visibility .3s ease-in-out;
transition: transform .3s ease-in-out, visibility .3s ease-in-out, -webkit-transform .3s ease-in-out;
}
.offcanvas-collapse.open {
left: 0;
visibility: visible;
-webkit-transform: translateX(-100%);
transform: translateX(-100%);
}
}