Bootstrap 3 now uses CSS transform translate3d instead of CSS transitions for better animations using GPU hardware acceleration.
It uses the following CSS (no easing)
.modal.fade .modal-dialog { -webkit-transform: translate3d(0, -25%, 0); transform: translate3d(0, -25%, 0); }
Here is the CSS you can use to navigate from the LEFT side
.modal.fade:not(.in) .modal-dialog { -webkit-transform: translate3d(-25%, 0, 0); transform: translate3d(-25%, 0, 0); }
Note the negative selector. I noticed that this is necessary in order to interfere with the definition of .modal.in. Modal-dialog. Note. I am not a CSS guru, so if anyone can better explain this, feel free to :)
How to move from different directions:
- top:
translate3d(0, -25%, 0) - bottom:
translate3d(0, 25%, 0) - left:
translate3d(-25%, 0, 0) - right:
translate3d(25%, 0, 0)
If you want to mix and match different directions of the slides, you can assign the class as "left" for the modal ...
<div class="modal fade left"> ... </div>
... and then focus on CSS:
.modal.fade:not(.in).left .modal-dialog { -webkit-transform: translate3d(-25%, 0, 0); transform: translate3d(-25%, 0, 0); }
BONUS . You can go in a bit and jump at an angle:
- top left:
translate3d(-25%, -25%, 0) - top-right:
translate3d(25%, -25%, 0) - bottom left:
translate3d(-25%, 25%, 0) - bottom right:
translate3d(25%, 25%, 0)
UPDATE (05/28/15): I updated the script to display alternative angles
If you want to use this in the LESS template, you can use the mixin BS3 prefix (as long as it is enabled)
.modal.fade:not(.in) .modal-dialog { .translate3d(-25%, 0, 0); }