使Bootstrap下拉菜单仅向下移动? [英] Make bootstrap dropdown menu go only downwards?
本文介绍了使Bootstrap下拉菜单仅向下移动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的以下Bootstrap Select Box出现了一些问题
i have a little problem with my Bootstrap Select Box on the following
您可能会注意到,在上下滚动页面时,下拉菜单会同时向上/向下打开.
As you might notice while scrolling the page up and down its disturbing the dropdown opens to both sides up/down.
现在我不确定这是否是Bootstrap Select的错误或标准功能.
Now i am not sure if this might be a bug or standard functionality of the Bootstrap Select.
预览:
我如何解决此问题仅将其向下打开?
How i am able to fix this to only opens downwards?
感谢您的提前帮助.
推荐答案
可以通过javascript传递选项
Options can be passed via javascript
$('.selectpicker').selectpicker({
dropupAuto: false
});
或
通过HTML标记
<select class="selectpicker" data-dropup-auto="false">
<option>1</option>
<option>2</option>
<option>3</option>
</select>
这篇关于使Bootstrap下拉菜单仅向下移动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文