body { background: #000; width:100%; } rect { fill:#000; stroke: red; stroke-width: .2em; } .square:nth-child(2n+1) rect { stroke: white; }