[英]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.