下拉菜单的滚动问题(自定义滚动条插件)
Scrolling issue with drop-downs(Custom Scrollbar Plugin)
我是 Rejowan Ahmed。在我的一个项目中,我使用 nicescroll 作为默认的滚动条插件。现在我面临更大的问题。我有几个下拉菜单的侧边栏。侧边栏是固定的。我在那里使用 nicescroll。但是当我打开底部下拉菜单时,滚动条 无法检测到高度 。所以,它隐藏了它下面的内容。如何解决?或者有没有其他好的插件没有这样的问题? 请帮助我!这是代码
HTML
<div class="sidebar scrollbar shadow-lg">
<div> Content Here With Dropdowns </div>
</div>
CSS
.sidebar{
position: fixed;
overflow: auto;
height: 100%;
bottom: 0;
left: 0;
min-width: 240px;
margin: 0;
font-size: 18px;
padding-bottom: 50px;
}
JS
$(document).ready(function() {
$(".scrollbar").niceScroll({
cursorcolor: "rgba(44, 187, 244, 0.2)",
autohidemode: "cursor",
cursorwidth: "8px",
cursorborder: "none",
cursorborderradius: "2px",
background: "rgba(10, 161, 219, 0.1) none repeat scroll 0% 0%",
cursorminheight: 20,
});
});
雷乔万艾哈迈德
主要问题在于您的设计,不要将滚动条保留在侧边栏中设计本身不直观
您也可以参考 jquery 解决问题的插件,查看导航中的 bootstrap JS 下拉功能,然后尝试更改侧边栏
我终于找到了解决方案。之前在这里问过同样的问题,它对我有用。请参阅下面的问题。
Jquery Nice scroll not working
我是 Rejowan Ahmed。在我的一个项目中,我使用 nicescroll 作为默认的滚动条插件。现在我面临更大的问题。我有几个下拉菜单的侧边栏。侧边栏是固定的。我在那里使用 nicescroll。但是当我打开底部下拉菜单时,滚动条 无法检测到高度 。所以,它隐藏了它下面的内容。如何解决?或者有没有其他好的插件没有这样的问题? 请帮助我!这是代码
HTML
<div class="sidebar scrollbar shadow-lg">
<div> Content Here With Dropdowns </div>
</div>
CSS
.sidebar{
position: fixed;
overflow: auto;
height: 100%;
bottom: 0;
left: 0;
min-width: 240px;
margin: 0;
font-size: 18px;
padding-bottom: 50px;
}
JS
$(document).ready(function() {
$(".scrollbar").niceScroll({
cursorcolor: "rgba(44, 187, 244, 0.2)",
autohidemode: "cursor",
cursorwidth: "8px",
cursorborder: "none",
cursorborderradius: "2px",
background: "rgba(10, 161, 219, 0.1) none repeat scroll 0% 0%",
cursorminheight: 20,
});
});
雷乔万艾哈迈德 主要问题在于您的设计,不要将滚动条保留在侧边栏中设计本身不直观 您也可以参考 jquery 解决问题的插件,查看导航中的 bootstrap JS 下拉功能,然后尝试更改侧边栏
我终于找到了解决方案。之前在这里问过同样的问题,它对我有用。请参阅下面的问题。
Jquery Nice scroll not working