CSS3 属性选择器
[att*=val] 当attr包含val时候
[att^=val] 当attr以val开头时
[att$=val] 当attr以val结尾时
CSS3 伪类选择器
a:link
a:visited
a:hover
a:active
a:enabled
a:disabled
input:checked
input:focus
input:read-only
input:default
input:indeterminate
p:first-line
p:first-letter
li:before
li:after
CSS3 关键字选择器
body *:not(h1)
:empty
:root
:target
li:first-child
span:last-child
tr:nth-child(even/odd)
CSS3 典型用法:
img:after{content:attr(alt);}
span:before{content:url(new.png);}
h1:before{content:counter(counterA);}
h1{counter-increment:counterA;}
h1:before{content:'第'counter(counterA)'章';}
div{text-shadow:5px 5px 5px gray;}
word-wrap:normal | break-word
box-sizing: content-box | border-box
div{
-webkit-transition: #ffff 1s linear;
-moz-transition: #fff 1s linear;
-o-transition: #fff 1s linear;
}
div:hover{
-webkit-animation-name:
}
CSS3 服务端字体:
@font-face{
font-family: WebFont;
src: url('font/Fontin_Sans_R_45b.otf') format('opentype');
font-weight:normal;
}
OpenType格式字体文件以 otf 结尾,TrueType字体文件以 ttf 结尾
font-size-adjust:0.46
其中0.46为某种字体的aspect值,计算方式为x-height除以字体的尺寸,x-height为小写x的高度,单位为像素
[att*=val] 当attr包含val时候
[att^=val] 当attr以val开头时
[att$=val] 当attr以val结尾时
CSS3 伪类选择器
a:link
a:visited
a:hover
a:active
a:enabled
a:disabled
input:checked
input:focus
input:read-only
input:default
input:indeterminate
p:first-line
p:first-letter
li:before
li:after
CSS3 关键字选择器
body *:not(h1)
:empty
:root
:target
li:first-child
span:last-child
tr:nth-child(even/odd)
CSS3 典型用法:
img:after{content:attr(alt);}
span:before{content:url(new.png);}
h1:before{content:counter(counterA);}
h1{counter-increment:counterA;}
h1:before{content:'第'counter(counterA)'章';}
div{text-shadow:5px 5px 5px gray;}
word-wrap:normal | break-word
box-sizing: content-box | border-box
div{
-webkit-transition: #ffff 1s linear;
-moz-transition: #fff 1s linear;
-o-transition: #fff 1s linear;
}
div:hover{
-webkit-animation-name:
}
CSS3 服务端字体:
@font-face{
font-family: WebFont;
src: url('font/Fontin_Sans_R_45b.otf') format('opentype');
font-weight:normal;
}
OpenType格式字体文件以 otf 结尾,TrueType字体文件以 ttf 结尾
font-size-adjust:0.46
其中0.46为某种字体的aspect值,计算方式为x-height除以字体的尺寸,x-height为小写x的高度,单位为像素