偶数行

JavaScript

html如何选择li的偶数列

64 0

html中可以使用“:nth-of-type()”选择器选择li的偶数列,语法“li:nth-of-type(even){}”。“:nth-of-type(n)”选择器匹配父元素特定类型的子元素,当值为even时,表示匹配下标是偶数的元素。本教程操作环境:windows7系统、CSS3&&HTML5版、Dell G3电脑。可以使用li:nth-of-type(even) {......}来选择li