CSS introduces external fonts

Source: Internet
Author: User

<style> @font-face{font-family:myfirstfont;src:url ('sansation_ Light.ttf'),     url ('sansation_light.eot'/*  */}div{font-family:myfirstfont;} </style>

Different browser fonts are formatted differently

Firefox, Chrome, Safari, and Opera support. TTF (True type Fonts) and. OTF (OpenType Fonts) types of fonts.

Internet Explorer + + supports the new @font-face rules, but only the. EoT type of font (Embedded OpenType) is supported.

Note: Internet Explorer 8 and earlier versions do not support the new @font-face rules.

.TTF或.OTF,适用于Firefox 3.5、Safari、Opera * .EOT,适用于Internet Explorer 4.0+ * .SVG,适用于Chrome、IPhone 比如:
@font-Face {font-family:'Hanshanditalic'; Src:url ('Fonts/hanshand-webfont.eot'); Src:url ('fonts/hanshand-webfont.eot? #iefix') Format ('Embedded-opentype'), url ('Fonts/hanshand-webfont.woff') Format ('Woff'), url ('Fonts/hanshand-webfont.ttf') Format ('TrueType'), url ('fonts/hanshand-webfont.svg#webfont34m5alkg') Format ('svg'); Font-Weight:normal; Font-Style:normal;}

 

CSS introduces external fonts

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.