MaterializeCSS下拉菜单向上 [英] MaterializeCSS dropdown menu going upward

查看:112
本文介绍了MaterializeCSS下拉菜单向上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用MaterializeCSS http://materializecss.com/dropdown.html 中的下拉菜单,但是我希望该菜单向上打开而不是向下打开.我可以通过选项执行此操作,还是必须直接在框架中更改某些内容?我试图在选项和其他选项中使用装订线,但它不起作用.

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.

推荐答案

这可以解决您的问题.

像这样 belowOrigin:true 一样将其设置为true//在按钮下方显示下拉菜单

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 } );

$('.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 } );

这篇关于MaterializeCSS下拉菜单向上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆