最新消息:

第25款插件:jquery.accordion.js 纵向手风琴效果插件

手风琴插件 杨红伟 5791浏览 0评论

描述:这款手风琴效果适用于折叠的菜单,方便使用!用这款插件制作极其方便,只需要定义很少的参数,便可制作出纵向手风琴效果!

兼容浏览器: IE6+/Firefox/Google Chrome
官方链接: 暂无
JS下载: http://www.ijquery.cn/js/jquery.accordion.js
预览: http://www.ijquery.cn/demo/accordion
打包下载: http://www.ijquery.cn/demo/accordion/accordion.zip
参数说明:

图片展示:

11

JS引用代码:特别注意,这里需要引入demensions.js这个js

[js]

<script type="text/javascript" src="http://www.ijquery.cn/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="http://www.ijquery.cn/js/jquery.dimensions.js"></script>
<script type="text/javascript" src="http://www.ijquery.cn/js/jquery.accordion.js"></script>
<script type="text/javascript">
$().ready(function(){
$('.basic').accordion({
event: 'mouseover'
});
});
</script>

[/js]

 

HTML代码:

[html]

<div style="margin:0 auto;margin-top:50px;" >
<a>菜单一:</a>
<div>
<p>
You've seen it coming!

Buy now and get nothing for free!

Well, at least no free beer. Perhaps a bear,

if you can afford it.
</p>
</div>
<a>菜单二:</a>
<div>
<p>
your bear, you have to admit it!

No, we aren't selling bears.
</p>
</div>
<a>菜单三:</a>
<div>
<p>
get two for three beer.
</p>
<p>
And now, for something completely different.

And now, for something completely different.

And now, for something completely different.

And now, for something completely different.

And now, for something completely different.

And now, for something completely different.

And now, for something completely different.

And now, for something completely different.

Period.
</p>
</div>
</div>

[/html]

 

CSS代码:这里需要两张图片,就是鼠标经过时的两张图片,在这里就不上传了,自己随便制作两个高29px的图片即可!

[css]<link rel="stylesheet" href="demo.css" />[/css]

即:

[css]

.basic  {
width: 260px;
font-family: verdana;
border: 1px solid black;
}
.basic div {
background-color: #eee;
}

.basic p {
margin-bottom : 10px;
border: none;
text-decoration: none;
font-weight: bold;
font-size: 10px;
margin: 0px;
padding: 10px;
}
.basic a {
cursor:pointer;
display:block;
padding:5px;
margin-top: 0;
text-decoration: none;
font-weight: bold;
font-size: 12px;
color: black;
background-color: #00a0c6;
border-top: 1px solid #FFFFFF;
border-bottom: 1px solid #999;

background-image: url("AccordionTab0.gif");
}
.basic a:hover {
background-color: white;
background-image: url("AccordionTab2.gif");
}
.basic a.selected {
color: black;
background-color: #80cfe2;
background-image: url("AccordionTab2.gif");
}

[/css]

与本文相关的文章

  • 暂无相关文章!
发表我的评论
取消评论
表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址