mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-28 20:52:21 +01:00
Offcanvas example: transition the transform (#28203)
This is more efficient than transitioning the `left` property.
This commit is contained in:
parent
52e6ce4512
commit
c56b10c147
@ -19,13 +19,14 @@ body {
|
|||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
background-color: #343a40;
|
background-color: #343a40;
|
||||||
transition-timing-function: ease-in-out;
|
transition: visibility .3s ease-in-out, -webkit-transform .3s ease-in-out;
|
||||||
transition-duration: .3s;
|
transition: transform .3s ease-in-out, visibility .3s ease-in-out;
|
||||||
transition-property: left, visibility;
|
transition: transform .3s ease-in-out, visibility .3s ease-in-out, -webkit-transform .3s ease-in-out;
|
||||||
}
|
}
|
||||||
.offcanvas-collapse.open {
|
.offcanvas-collapse.open {
|
||||||
left: 0;
|
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
|
-webkit-transform: translateX(-100%);
|
||||||
|
transform: translateX(-100%);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user