Перед изменением браузера < /p>
после изменения размера браузера < /p>
jsx code < /p>
function Navbar() {const [currentTab, changeTab] = useState("Home");
return (
- Home
- Execution
- Review
- Profile
- Setting
);
}
export default Navbar;
< /code>
css: < /p>
.navbar {
background-color: transparent;
height: 80px;
display: flex;
justify-content: start;
align-items: center;
padding: 0 0 0 0 ;
}
.menu-bars {
margin-left: 2rem;
font-size: 2rem;
background: none;
}
.nav-menu {
background-color: aqua;
width: 250px;
height: 100vh;
display: flex;
justify-content: center;
position: fixed;
top: 0;
}
.nav-menu-item {
width: 100%;
}
.nav-text {
display: flex;
justify-content: start;
align-items: center;
padding: 8px 0px 8px 16px;
list-style: none;
height: 60px;
}
< /code>
app.jsx:
function DefaultContainer() {
return (
);
}
export default App;
Подробнее здесь: https://stackoverflow.com/questions/663 ... is-resized
Мобильная версия