我找到了这个很酷的插件甜蜜菜单,当我单击链接时,我无法让easeoutbounce 动画停止。例如,当我单击主动画时,我希望有一个“下状态”,我希望看到动画(非常像鼠标悬停功能(但没有用鼠标离开返回。我希望有人可以帮助我,因为我我是所有这些代码的新手,我开始疯狂了:)提前感谢您的帮助!
这是脚本:
<script type="text/javascript" src="Widgets/sweetMenu/jquery.easing.js"></script>
<script type="text/javascript" src="Widgets/sweetMenu/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="Widgets/sweetMenu/jquery.sweet-menu-1.0.js"></script>
<script type="text/javascript" src="Widgets/sweetMenu/jquery.sweet-menu-min-1.0.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#exampleMenu').sweetMenu({
top: 200,
padding: 8,
iconSize: 48,
easing: 'easeOutBounce',
duration: 500,
icons: [
'widgets/sweetmenu/images/home.png',
'widgets/sweetmenu/images/comments.png',
'widgets/sweetmenu/images/red_heart.png',
'widgets/sweetmenu/images/male_user.png',
'widgets/sweetmenu/images/yellow_mail.png',
'widgets/sweetmenu/images/computer.png'
]
});
});
</script>
这是CSS:
.sweetMenuAnchor{
border-top: 1px solid #ffffff;
border-right: 1px solid #ffffff;
border-bottom: 1px solid #ffffff;
border-top-right-radius: 4px;
-moz-border-radius-topright: 4px;
border-bottom-right-radius: 4px;
-moz-border-radius-bottomright: 4px;
color: #0071bb;
font-size: 24px;
font-weight: bold;
text-align: right;
text-transform: uppercase;
font-family: Arial, Helvetica, sans-serif;
text-decoration: none;
background-color: #888888;
opacity: 0.6;
visibility: visible;
z-index: 999999;
}
.sweetMenuAnchor span{
display: block;
padding-top: 10px;
}
h1
{
display: block;
text-align: center;
font-size: 48px;
color: #ffffff;
text-shadow: 0px 0px 12px #000000;
font-family: "Trebuchet MS";
}
最后是 HTML:
<ul id="exampleMenu">
<li><a href="#">Home</a></li>
<li><a href="#">Blog</a></li>
<li><a href="#home">portfolio</a></li>
<li><a href="#home">Hire Me</a></li>
<li><a href="#home">Contact</a></li>
<li><a href="#home">My Apps</a></li>
</strike>