@angelostone
倒数五个不用一个个写啊, 直接 li:nth-last-child(-n+5) , 写成 5-n chrome居然没效果
倒数五个不用一个个写啊, 直接 li:nth-last-child(-n+5) , 写成 5-n chrome居然没效果
2015-06-19
.wrapper > div:nth-of-type(odd),
.wrapper > p:nth-of-type(2n){
background: orange;
}
/*或者*/
.wrapper > div:not(:nth-of-type(even)),
.wrapper > p:nth-of-type(2n){
background: orange;
}
/*或者*/
.wrapper > div:nth-of-type(2n+1),
.wrapper > p:nth-of-type(even){
background: orange;
}
.wrapper > p:nth-of-type(2n){
background: orange;
}
/*或者*/
.wrapper > div:not(:nth-of-type(even)),
.wrapper > p:nth-of-type(2n){
background: orange;
}
/*或者*/
.wrapper > div:nth-of-type(2n+1),
.wrapper > p:nth-of-type(even){
background: orange;
}
2015-06-19
background-image:linear-gradient(to top left,#fff,#999,blue,red)
2015-06-19
注意标点符号,多写几遍
background:url(http://static.mukewang.com/static/img/logo_index.png) no-repeat left top/75% 66%,
url(http://static.mukewang.com/static/img/logo_index.png) no-repeat right bottom/50% 33%;
background-position:0 0,right bottom;
background:url(http://static.mukewang.com/static/img/logo_index.png) no-repeat left top/75% 66%,
url(http://static.mukewang.com/static/img/logo_index.png) no-repeat right bottom/50% 33%;
background-position:0 0,right bottom;
2015-06-19
50px 0px 0px 50px中的50px只要大于等于50就可以,例如设置成51px,60px,100px,都行
2015-06-19
刚开始还不懂nth-of-type和nth-child的区别,研究了一下才明白,nth-of-type是父元素下第n个element的元素(首先那个元素必须是符合element的),而nth-child是父元素下第几个元素,若不符合element,则选择失败
2015-06-18