One way - although, given the heterogeneous nature of css implementation / implementation, it may / will not work exhaustively: use
.fancy { border: thin solid #888; } .fancy:nth-of-type(odd), .fancy:nth-of-type(even) { border: 0 none transparent; box-shadow: 0px 1px 4px #888; -webkit-box-shadow: 0px 1px 4px #888; -moz-box-shadow: 0px 1px 4px #888; }
This is a bit messy, because the selector should explicitly target all the odd and even .fancy , I would prefer a .fancy solution, but it really works (of course, in Chrome / Linux). Demo at: http://jsbin.com/ezako3
source share