HTML CSS examples for CSS Form:input button style
change colors for alternate buttons using CSS with :nth-child(odd)
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> button:nth-child(odd) { background:green } button:nth-child(even) { background:red } </style> </head> <!--from w ww . j a v a 2 s . c om--> <body> <button></button> <button></button> <button></button> <button></button> <button></button> <button></button> </body> </html>