给最后一个li增加样式 用Jquery来写: $(".rec3 li:last").css("margin-right", "0px"); 说明: 1、$(".rec3 li:last")选择器下的最后一个元素 2、增加样式