<script type="text/javascript"> $(function(){ //去除多余的border var len=$(".news li").length; $(".news li").each(function(i){ if((i+1)%6==0 || (i+1)%len==0){ $(this).css("border-bottom","none") } }) }) </script>