javascript - Highlight every other list element -


I have such a div:. How can I highlight every other list element in the div without the use of jQuery?

The easiest way to perform this is with a CSS, for a compatible browser. Example:

  li: nth-child (even) {background: #CCC} li: nth-child (strange) {background: #FFF}    

Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -