此代码适用于所有浏览器,但在Internet Explorer和旧浏览器中不起作用。对于旧浏览器和Internet Explorer,它也可以用jquery来实现吗?
.post {position:relative;float:left;width:207px;height:300px;margin-right:24px}
.post:nth-child(4n) {margin-right:0px !important;}
答案 0 :(得分:1)
你可以。在jQuery中,尝试
$(".post:nth-child(4n)").css('margin-right', '0px !important');