经典手风琴三种效果,自定义功能很强大,请查看classicAccordion相关API参数。
0、请不要问“在不在”之类的问题,有问题直接问!1、学生或暂时没有工作的童鞋,整站资源免费下载!2、¥9.9充值终身VIP会员,加我微信,826096331 拉你进VIP群学习!3、程序员加油,技术改变世界。在线 充值
手风琴ul li列表
<ul class="accordion">
<li>
<img src="http://www.erdangjiade.com/uploads/publish/56e5ebf1e81bd.jpg"/>
<div class="caption">超帅的中文响应式网络公司网页模板</div>
</li>
<li>
<img src="http://www.erdangjiade.com/uploads/publish/56e5ec37a03a5.jpg"/>
</li>
<li>
<img src="http://www.erdangjiade.com/uploads/publish/56e5ec76bbf6f.jpg"/>
<div class="caption">You can also add <b>HTML</b> elements like <a href="http://www.erdangjiade.com/templates/318.html">links</a> or <input type="button" value="Buttons"/></div>
</li>
</ul>
引入手风琴插件classicAccordion.js
<script type="text/javascript" src="js/jquery.classicAccordion.min.js"></script>
var accordion;
$(document).ready(function() {
accordion = $('.accordion').classicAccordion({width: 1200, height: 400, slideshow: true, shadow: true, alignType: 'centerCenter', closedPanelSize: 40,
panelProperties: {
0: {captionWidth: 200, captionHeight: 35, captionTop: 30, captionLeft: 30},
2: {captionWidth: 380, captionHeight: 40, captionTop: 330, captionLeft: 30},
4: {captionWidth: 150, captionHeight: 120, captionTop: 270, captionLeft: 600},
7: {captionWidth: 300, captionHeight: 35, captionTop: 180, captionLeft: 250},
8: {captionWidth: 380, captionHeight: 40, captionTop: 330, captionLeft: 30},
10: {captionWidth: 150, captionHeight: 120, captionTop: 30, captionLeft: 620}
}
});
accordion.openPanel(0);
});
参数 | 描述 | 默认值 |
captionWidth | 标题宽度 | 300 |
captionHeight | 标题高度 | 100 |
captionTop | 标题顶部距离 | 100 |
captionLeft | 标题左侧距离 | 30 |
shadow | 是否显示阴影层 | true |
linkTarget | 打开链接方式,默认新窗口 | _blank |
openPanelDelay | 打开延迟时间 | 200 |
orientation | 手风琴方向,有horizontal和vertical | horizontal |
width | 手风琴宽度 | 500 |
height | 手风琴高度 | 300 |
alignType | 对其方式 | leftTop |
distance | 间隔距离 | 0 |
slideshow | 开启滑动效果 | false |
slideDuration | 滑动延时时间 | 700 |
openPanelOnMouseOver | 鼠标悬浮打开 | true |
closePanelOnMouseOut | 鼠标离开关闭 | true |
openPanelOnClick | 鼠标点击打开 | false |
友情提示:垃圾评论一律封号 加我微信:826096331拉你进VIP群学习群