nth-child(5) 好用的Css选择器
作者:互联网
.textBox:nth-child(2n-1) { background-image: url(../assets/rowBg.png); } .textBox:nth-child(1) { background-image: url(../assets/firstRow.png); } .textBox:nth-child(2) { background-image: url(../assets/secondRow.png); } .textBox:nth-child(3) { background-image: url(../assets/threeRow.png); } .textBox:nth-child(4) { background-image: url(../assets/fourRow.png); } .textBox:nth-child(5) { background-image: url(../assets/fiveRow.png); }
表示. textBox的父元素 下 的 textBox
.textBox:nth-child(5) //表示textBox的父元素下的 第五个textBox !!!!!
标签:..,image,nth,background,child,选择器,Css,textBox 来源: https://www.cnblogs.com/Jarsmine/p/16467577.html