带动画的 YUI 菜单

发布于 2024-07-30 19:32:06 字数 30 浏览 4 评论 0原文

是否可以让 YUI 菜单滑入而不是简单地弹出?

Is it possible to have YUI menus e.g. slide in as opposed to simply popping up?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

她比我温柔 2024-08-06 19:32:06

一个较旧的(小心我使用它的时候,它需要补丁)系列示例之一,用于使用各种事件来实现此功能的 YUI MenuBar hacks:

http://developer.yahoo.com/yui/examples/menu/topnavfrommarkupwithanim.html

我认为这不是开箱即用的,这是一个无赖。 我的另一个烦恼是,一旦用户将鼠标悬停在某些选项上,就没有(内置)方法自动隐藏子菜单。 这对于可访问性来说是有意义的(根据 YUI 团队的说法,这也是它之所以如此的原因),但是对于那些只会将其视为损坏的客户,我无能为力。

One of the older (be careful as at the time I used it, it required patches) series of examples for YUI MenuBar hacks in this functionality using various events:

http://developer.yahoo.com/yui/examples/menu/topnavfrommarkupwithanim.html

I don't think this is available out of the box, which is a bummer. Another peeve of mine is that there's no (built-in) way to hide submenus automatically once the user has moused over some options. This makes sense for accessibility (and is the reason it is like that, according to the YUI team), but there's nothing I can do about clients who will only see it as broken.

维持三分热 2024-08-06 19:32:06

有原因的。 您应该为小部件设置幻灯片效果。

var oMenu = new YAHOO.widget.Menu( 
                        "productsandservices",  
                        { 
                            position: "static",  
                            hidedelay: 750,  
                            lazyload: true,  
                            effect: {  
                                effect: YAHOO.widget.ContainerEffect.SLIDE, 
                                duration: 0.25 
                            }  
                        } 
                ); 

Of cause. You should set up SLIDE effect for the widget.

var oMenu = new YAHOO.widget.Menu( 
                        "productsandservices",  
                        { 
                            position: "static",  
                            hidedelay: 750,  
                            lazyload: true,  
                            effect: {  
                                effect: YAHOO.widget.ContainerEffect.SLIDE, 
                                duration: 0.25 
                            }  
                        } 
                ); 
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文