@Font-face Current Browser compatibility:
Webkit/safari (3.2+)
Truetype/opentype TT (. ttf), OpenType PS (. OTF);
Opera ( + +)
Truetype/opentype TT (. ttf), OpenType PS (. OTf), SVG (. svg);
Internet Explorer
Since IE4, support font files in EOT format; IE9 support Woff;
Firefox (3.5+)
Truetype/opentype TT (. ttf), OpenType PS (. OTf), WOFF (since Firefox 3.6)
Google Chrome
Truetype/opentype TT (. ttf), OpenType PS (. OTf), WOFF since version 6
It can be concluded from the above:. EoT +. TTF/.OTF + svg + Woff = Perfect support for all browsers
Grammar
@Font-face{[Font-family:<family-name>;]? [Src: [<uri> [format (<string>#)]? | <font-face-name >]#; unicode-range: <urange>#;]? [font-variant: <font-variant>;]? [font-feature-settings: normal|<feature-tag-value># ; font-stretch: <font-stretch>;]? [font-weight: <weight>]; [font-style: <style>];"
Font-face How to use CSS in a specific way
/* Declare webfont*/@Font-face{Font-family: ' Pinghei ';Src: Url‘.. /font/pinghei.eot ');Src: Url‘.. /font/pinghei.eot? #iefix ')Format' Embedded-opentype '),Url‘.. /font/pinghei.woff ')Formaturl (format (url ("). /font/pinghei.svg ') format ( ' svg '); font-weight: normal; font-style: Normal;} /* using the specified font */.test { font-family: Pinghei '; /span>
[go] CSS custom font font-face compatibility and use