Make bootstrap dropdown menu go only downwards?

白昼怎懂夜的黑 提交于 2019-12-11 06:06:22

问题


i have a little problem with my Bootstrap Select Box on the following

Website

As you might notice while scrolling the page up and down its disturbing the dropdown opens to both sides up/down.

Now i am not sure if this might be a bug or standard functionality of the Bootstrap Select.

Preview:

How i am able to fix this to only opens downwards?

thanks for your kind help in advance.


回答1:


Options can be passed via javascript

$('.selectpicker').selectpicker({
    dropupAuto: false
});

or

by HTML tag

<select class="selectpicker" data-dropup-auto="false">
    <option>1</option>
    <option>2</option>
    <option>3</option>
</select>


来源:https://stackoverflow.com/questions/45959649/make-bootstrap-dropdown-menu-go-only-downwards

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!