リストがあり、色を変更して余白を削除するには、他のすべてのアイテムが必要です。私はn番目の子を使用しましたが、IE7-8以外のすべてで完全に機能します。n番目の子をサポートしていないことを知っているので、Jqueryを使用しました。
私はこれを見つけました::nth-childはIEで動作していません そしてこれ:http://verboselogging.com/2010/01/17/making-nth-child-work-everywhere
それらを実装しようとしましたが、まだ機能していません。ここで表示できます: http ://www.dffernandez.com/client_review_files/tests/nth-child.html
#prop-images-wrapper {
float: left;
margin-bottom: 0.6em;
background-color: #F00;
width: 340px;
margin-right: 5px;}
#prop-images-wrapper li:nth-child(2n+1), .difcolor {
margin-right: 0px;
background-color: #06F;}
-
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script>$(document).ready(function(){
$("#prop-images-wrapper li:nth-child(2n+1)").addClass("difcolor");
});</script>
前もって感謝します。