To make the Bootstrap 5 Off-Canvas slide in from left to right, you need to do the following:
Open the CSS file that controls the Off-Canvas component
Find the following CSS class, which controls the animation for the Off-Canvas component:
.offcanvas-start {
transform: translateX(-100%);
visibility: visible;
}
transform
property to translate the Off-Canvas component from left to right:.offcanvas-end {
transform: translateX(100%);
visibility: visible;
}
offcanvas-end
class to the Off-Canvas component:<div class="offcanvas offcanvas-end" tabindex="-1" id="myOffcanvas" aria-labelledby="myOffcanvasLabel">
<!-- Off-Canvas content goes here -->
</div>
With these changes, the Off-Canvas component will now slide in from left to right instead of right to left.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2022-04-18 11:00:00 +0000
Seen: 9 times
Last updated: Jun 10 '22
How can one ensure that sub-classes have uniform method parameters in TypeScript?
How can the calculation of matrix determinant be performed using CUDA?
How can code repetition be prevented when using (box)plot functions?
When I attempt to generate a database, why does the azure-cosmos-emulator become unresponsive?
What steps can I take to prevent my webpage from slowing down when all parts of a div are displayed?