gpt4 book ai didi

html - 使 Bootstrap 仪表板示例侧边栏在移动设备上可见/可用

转载 作者:太空狗 更新时间:2023-10-29 13:40:58 24 4
gpt4 key购买 nike

Boostrap dashboard example当屏幕宽度小于 768px 时,完全隐藏侧边栏导航(不折叠或堆叠)。您将如何通过这样的设置来支持移动设备?

最佳答案

Bootstrap 4

Create a responsive navbar sidebar "drawer" in Bootstrap 4?

Bootstrap 3

另一种选择是组合仪表板和“ Canvas 外”侧边栏模板。此布局允许侧边栏以较小的宽度在屏幕上关闭/打开...

http://bootply.com/128936

@media screen and (max-width: 768px) {
.row-offcanvas {
position: relative;
-webkit-transition: all 0.25s ease-out;
-moz-transition: all 0.25s ease-out;
transition: all 0.25s ease-out;
}

.row-offcanvas-left
.sidebar-offcanvas {
left: -33%;
}

.row-offcanvas-left.active {
left: 33%;
}

.sidebar-offcanvas {
position: absolute;
top: 0;
width: 33%;
margin-left: 10px;
}
}


/* Sidebar navigation */
.nav-sidebar {
background-color: #f5f5f5;
margin-right: -15px;
margin-bottom: 20px;
margin-left: -15px;
}
.nav-sidebar > li > a {
padding-right: 20px;
padding-left: 20px;
}
.nav-sidebar > .active > a {
color: #fff;
background-color: #428bca;
}

关于html - 使 Bootstrap 仪表板示例侧边栏在移动设备上可见/可用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22985370/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com