MaterializeCSS dropdown menu going upward

微笑、不失礼 提交于 2020-01-24 19:43:20

问题


I'm using dropdown menu from MaterializeCSS http://materializecss.com/dropdown.html but I want that menu to open upward not downward. Can I do this via options or I will have to change some stuff direct in the framework? I tried to use gutter in options and other options and it does not work.


回答1:


This may solve your problem.

set it true like this belowOrigin: true, // Displays dropdown below the button

$('.dropdown-button').dropdown({ inDuration: 300, outDuration: 225, constrainWidth: false, gutter: 0, // Spacing from edge belowOrigin: true, // Displays dropdown below the button alignment: 'left', // Displays dropdown with edge aligned to the left stopPropagation: false // Stops event propagation } );



来源:https://stackoverflow.com/questions/38746509/materializecss-dropdown-menu-going-upward

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