首先#id是用于定位页面内的标签,通过target定义id的属性,当触发定位操作时,就触发定义target目标样式
2016-03-09
a[class^=column]{
background:red;
}
a[href$=doc]{
background:green;
}
a[title*=box]{
background:blue;
}
background:red;
}
a[href$=doc]{
background:green;
}
a[title*=box]{
background:blue;
}
2016-03-09
display:block;
-webkit-transform: skew(-45deg);
-moz-transform: skew(-45deg);
transform:skew(-45deg);
-webkit-transform: skew(-45deg);
-moz-transform: skew(-45deg);
transform:skew(-45deg);
2016-03-08
nth-child(2n+1) || nth-child(2n-1) || nth-child(odd)
nth-of-type(2n) || nnth-of-type(even)
nth-of-type(2n) || nnth-of-type(even)
2016-03-08
“:first-of-type”选择器类似于“:first-child”选择器,不同之处就是指定了元素的类型,其主要用来定位一个父元素下的某个类型的第一个子元素。
2016-03-08
li:nth-last-of-type(5)
li:nth-last-child(5)
li:nth-last-child(5)
2016-03-08
li:nth-child(odd)
li:nth-child(2n+1)
li:nth-of-type(odd)
li:nth-of-type(2n+1)
li:nth-child(2n+1)
li:nth-of-type(odd)
li:nth-of-type(2n+1)
2016-03-08
a[class^=column]{
background-color:red;
}
a[href$=doc]{
background-color:green;
}
a[title]{
background-color:blue;
}
background-color:red;
}
a[href$=doc]{
background-color:green;
}
a[title]{
background-color:blue;
}
2016-03-08
.nav li:after {
content:"";
margin:0 1.2em;
display:inline-block;
width:1px;
height:24px;
position:relative;
top:8px;
background:linear-gradient(180deg,rgba(0,0,0,0),rgba(0,0,0,0.3),rgba(0,0,0,0));
}
.nav li:last-child:after{ width:0; margin:0; }
content:"";
margin:0 1.2em;
display:inline-block;
width:1px;
height:24px;
position:relative;
top:8px;
background:linear-gradient(180deg,rgba(0,0,0,0),rgba(0,0,0,0.3),rgba(0,0,0,0));
}
.nav li:last-child:after{ width:0; margin:0; }
2016-03-08