html
<div class="deal-tabs">
<div class="deal-tabs-btn clearfix">
<div class="deal-col-2">
<li><a href="#" class="deal_btn current">大混级</a></li>
</div>
<div class="deal-col-2">
<li><a href="#" class="deal_btn">中混级</a></li>
</div>
<div class="deal-col-2">
<li><a href="#" class="deal_btn">中东</a></li>
</div>
<div class="deal-col-2">
<li><a href="#" class="deal_btn">南亚</a></li>
</div>
<div class="deal-col-2">
<li><a href="#" class="deal_btn">蒜米</a></li>
</div>
<div class="deal-col-2">
<li><a href="#" class="deal_btn">脱水</a></li>
</div>
<div class="deal-col-2">
<li><a href="#" class="deal_btn">级蒜4.5</a></li>
</div>
<div class="deal-col-2">
<li><a href="#" class="deal_btn">级蒜5.0</a></li>
</div>
<div class="deal-col-2">
<li><a href="#" class="deal_btn">净蒜</a></li>
</div>
<div class="deal-col-2">
<li><a href="#" class="deal_btn">大混级</a></li>
</div>
<div class="deal-col-2">
<li><a href="#" class="deal_btn-more more-toggle"><span></span><p class="More">更多</p></a></li>
</div>
</div>
</div>
css
.deal-tabs .deal-tabs-btn{
margin: 0 -0.1rem;
}
.deal-col-2{
width: 20%;
float: left;
padding: 0 0.1rem;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.deal-tabs .current{
background-color: #ff2b3a;
color: #ffffff;
}
.deal_btn{
background-color: #ffffff;
box-shadow: 2px 2px 14px 2px #f2f3f7;
border: 0;
outline: none;
border-radius: 50px;
height: 0.52rem;
text-align: center;
line-height: 0.52rem;
font-size: 0.24rem;
color: #666666;
display: block;
margin-bottom: 0.3rem;
}
.deal_btn-more{
background-color: #ffffff;
box-shadow: 2px 2px 14px 2px #f2f3f7;
border: 0;
outline: none;
border-radius: 50px;
height: 0.52rem;
text-align: center;
line-height: 0.52rem;
font-size: 0.24rem;
color: #666666;
margin-bottom: 0.3rem;
display: block;
}
.deal_btn-more span{
background-image: url(../images/arrow.png);
width: 0.1rem;
height: 0.1rem;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
display: none;
}
.more-toggle.cur span{
transform: rotateY(180deg);
}
.more-toggle p{
display: inline-block;
}
js
<script type="text/javascript">
var lis = $('.deal-tabs-btn .deal-col-2 .deal_btn:gt(8)')
var liall = $('.deal-tabs-btn .deal-col-2 .deal_btn')
lis.hide()
$('.more-toggle').click(function(){
if($(this).hasClass("cur")){
$(this).removeClass("cur")
$(this).find('.More').text('更多')
lis.hide()
}else{
$(this).addClass("cur")
$(this).find('.More').text('收起')
liall.show();
}
})
</script>