CSS3 uses custom fonts and css3 custom Fonts

Source: Internet
Author: User

CSS3 uses custom fonts and css3 custom Fonts

CSS3 @ font-face rules

Before CSS3, web designers must use fonts that have been installed on users' computers.
With CSS3, web designers can use any font they like.
When you find or purchase a font that you want to use, you can store the font file on the web server and it will be automatically downloaded to your computer as needed.
Your "own" font is defined in the CSS3 @ font-face rule.


Firefox, Chrome, Safari, and Opera support. ttf (True Type Fonts) and. otf (OpenType Fonts) Fonts.
Internet Explorer 9 + supports new @ font-face rules, but only supports. eot fonts (Embedded OpenType ).
Note: Internet Explorer 8 and earlier versions do not support the new @ font-face rule.


Use the font you need
In the new @ font-face rule, you must first define the font name (for example, myFirstFont) and then point to the font file.
To use a font for HTML elements, use the font-family attribute to reference the font name (hoverTreeFont ).

First view the effect: http://hovertree.com/texiao/css/5.htm

Complete HTML code:

<! DOCTYPE html> 

Web Front-end: http://www.cnblogs.com/jihua/p/webfront.html

Related Article

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.