📜  CSS3-网络字体

📅  最后修改于: 2020-10-26 04:58:40             🧑  作者: Mango


Web字体用于允许CSS中的字体,这些字体未在本地系统上安装。

不同的网络字体格式

Sr.No. Font & Description
1

TrueType Fonts (TTF)

TrueType is an outline font standard developed by Apple and Microsoft in the late 1980s, It became most common fonts for both windows and MAC operating systems.

2

OpenType Fonts (OTF)

OpenType is a format for scalable computer fonts and developed by Microsoft

3

The Web Open Font Format (WOFF)

WOFF is used for develop web page and developed in the year of 2009. Now it is using by W3C recommendation.

4

SVG Fonts/Shapes

SVG allow SVG fonts within SVG documentation. We can also apply CSS to SVG with font face property.

5

Embedded OpenType Fonts (EOT)

EOT is used to develop the web pages and it has embedded in webpages so no need to allow 3rd party fonts

以下代码显示了字体的示例代码-


   
   
   
      
This is the example of font face with CSS3.

Original Text :This is the example of font face with CSS3.

它将产生以下结果-

字体说明

以下列表包含所有放置在@ font-face规则中的字体描述-

Sr.No. Value & Description
1

font-family

Used to defines the name of font

2

src

Used to defines the URL

3

font-stretch

Used to find, how font should be stretched

4

font-style

Used to defines the fonts style

5

font-weight

Used to defines the font weight(boldness)