在一个属性名为box的div中的ul标签,如何选择偶数项的li背景颜色为red,下列代码输入正确的是( )
A. .box ul li nth-child(0,2,4){background-color:red;}
B. .box ul li nth-child(2n){background-color:red;}
C. .box ul li:nth-child(0,2,4){background-color:red;}
D. .box ul li:nth-child(2n){background-color:red;}