Jquery每行最后一个LI边距设为0

下面用的是jquery方法,请加载jquery插件

<script type="text/javascript">
$(function(){
    $('#newhouse li:nth-child(3n+2)').css('margin-right', '0px');
    })
</script>

主要代码:nth-child(3n+2)

其中N表示倍数,2是偏移的位置数,自己调整即可 

posted @ 2016-04-25 13:58  God丶魔多  阅读(369)  评论(0编辑  收藏  举报