[Go] CSS custom font font-face compatibility and use

Source: Internet
Author: User

@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>];"              
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.