My bootstrap navbar
collapses and displays items outside of it. However, when I hide the menu, the overlay div
disappears immediately and does not transition smoothly with the menu. How can I apply a transition to the div
when hiding the menu?
I've tried various approaches but none of them seem to work as expected. What can I do to ensure that the overlay div
transitions smoothly when hiding along with the menu?
For a demo, please refer to this link: https://codesandbox.io/s/d31eo
React (demo):
import React, { Component } from "react";
import { Container, Nav, Navbar } from "react-bootstrap";
import "./styles.css";
import "bootstrap/dist/css/bootstrap.min.css";
export default class NavBar extends Component {
// Class implementation here...
}
CSS (demo):
.nav {
min-height: 55px;
width: 100%;
background-color: white;
border-bottom: 1px solid #979797;
}
.link {
font-size: 14px;
color: #3e433e;
line-height: 17px;
padding: 5px;
text-transform: uppercase;
}
/* More CSS styles... */