HTML手风琴原理,手风琴.html

dodou-移动框架

.accordion li{ border-bottom:1px solid #ececec; }

.accordion .accordion-tit{position: relative;}

.accordion .accordion-tit:after {

content: " ";

display: inline-block;

-webkit-transform: rotate(135deg);

transform: rotate(135deg);

height: 6px;

width: 6px;

border-width: 2px 2px 0 0;

border-color: #c8c8cd;

border-style: solid;

position: absolute;

right: 15px;

top: 50%;

margin-top: -3px;

}

.accordion .weui-cells{ margin-top: 0; display: none; background:#f2f2f2;}

.accordion li.cur{ border-bottom:none; }

.accordion li.cur .accordion-tit:after{

-webkit-transform: rotate(-45deg);

transform: rotate(-45deg);

margin-top: 0;

}

.accordion li.cur .weui-cells{ display: block; }

  • icon19.png

    我的好友(2/2)

    icon2.png

    标题文字

    icon1.png

    标题文字

    说明文字

    icon2.png

    数据统计

  • 我的好友(2/2)

    icon2.png

    标题文字

    icon2.png

    标题文字

$('.accordion-tit').click(function(){

$parent = $(this).parent('li');

if($parent.hasClass('cur')){

$parent.removeClass('cur');

$parent.siblings().removeClass('cur');

}else{

$parent.addClass('cur');

$parent.siblings().removeClass('cur');

}

});

一键复制

编辑

Web IDE

原始数据

按行查看

历史

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值