简体   繁体   English

像这样的菜单语言

[英]Menu Language like this one

I don't know if this is a "valid" question, so forgive me if it's not. 我不知道这是否是一个“有效”的问题,如果不是,请原谅我。 I wanted to make a language selector like the one in this webpage: 我想制作一种语言选择器,就像此网页中的选择器一样:

http://panicstation.pixelthrone.com/html/ http://panicstation.pixelthrone.com/html/

I Inspected the source and see that it was make by hoverIntent but I can't reproduce that. 我检查了源,发现它是由hoverIntent制造的,但我无法复制它。 Anyone knows how to do that ? 有人知道该怎么做吗?

The solution would be to use jquery : 解决方案是使用jquery:

http://jsfiddle.net/Z7ECR/41/ HTML: http://jsfiddle.net/Z7ECR/41/ HTML:

<ul>
    <li class="active">EN</li>
    <li class="hidden">ES</li>
    <li class="hidden">FR</li>
    <li class="hidden">PT</li>
</ul>

CSS : CSS:

ul {
    padding:5px;
    border:1px solid #000;
    border-radius:3px;
    text-align:center;
    width:25px;
}
li {
    list-style-type:none;
}
li.hidden {
    display:none;
    border-top:1px solid #000;
}

JS : JS:

$(document).ready(function () {
    $('ul').hover(function () {
        $('.hidden').stop(true, true).slideToggle(800);
    });
});

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 显示一个字幕的语言选择菜单 - Display Language selection menu for one subtitle 如何制作像 Kayak 中的下拉菜单? - How to make a dropdown menu like the one in Kayak? 想要在一个特定页面上使用不同的导航菜单...不起作用 - Would like a different nav menu on one specific page… not working 如何制作一个像amazon.com上的下拉菜单? - How to make a dropdown menu like the one on amazon.com? 能够将一个或多个单词从一种语言映射到另一种语言的可靠国际化方法看起来如何? - How does a reliable internationalization approach look like which is capable of mapping one or many words from one language to another? 为什么看起来像来自Electron中一个菜单项的IPC消息到达了我的窗口,但是却不是从另一个菜单iteam发送时却到达了我的窗口? - Why does it look like IPC messages from one menu item in Electron reach my window, but not when sent from another menu iteam? 诊断菜单(如IFTTT) - Diagnostic Menu (like IFTTT) 像Google一样的下拉菜单 - dropdown menu like on google 像WordPress一样的左菜单 - Left menu like wordpress 菜单汉堡按钮未按预期打开,需要单击两次才能打开而不是单击一次(在移动视图中) - menu burger button doesn't open like expected, it needs two click to open instead of one (in mobile view)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM