.nav li:after{
content:"";
position:absolute;
top:17px;
right:0px;
width:1px;
height:15px;
background:linear-gradient(to bottom, #f82f87,#A24,#f82f87);
}
.nav li:last-child::after
content:"";
position:absolute;
top:17px;
right:0px;
width:1px;
height:15px;
background:linear-gradient(to bottom, #f82f87,#A24,#f82f87);
}
.nav li:last-child::after
2015-03-28
最赞回答 / 黑店老板
楼上答非所问,首先:first-child后面是没有括号的,其次,:first-child 意思是选择父元素的第一个子元素的元素E。楼主问题的解答应该是: 你所想要的 nth-first-child(n)这个功能其实就是 :nth-child(n) 你可以自己试试,比如li:nth-child(3).
2015-03-27
后代元素是指整个元素的全部了!这里以列表框为例,就包括了,前面的序号和后面的内容,而元素的第一个子元素就只是指前面的序号,不包括内容了。
2015-03-27
^表示前缀包含
$表示后缀包含
*表示任意包含
刚开始看说明没太明白,忽然想起正则来,恍然大悟
a[class^=column] {background-color:red;}
a[href$=doc]{background-color:green;}
a[title*=box]{background-color:blue;}
$表示后缀包含
*表示任意包含
刚开始看说明没太明白,忽然想起正则来,恍然大悟
a[class^=column] {background-color:red;}
a[href$=doc]{background-color:green;}
a[title*=box]{background-color:blue;}
2015-03-27