css教程:CSS字体font属性的应用  

css教程:CSS字体font属性的应用  

The CSS font properties define the font in text.

CSS字体属性可定义文字所使用的字体。

设置文字的字体 Set the font of a text

This example demonstrates how to set a font of a text.

Examples 实例:

Source Code to Run [www.fun52.com]

h3 {font-family: times}

h5 {font-family: arial}

p {font-family: courier}

p.sansserif {font-family: sans-serif}

This is header 3

www.fun52.com

This is a paragraph

This is a paragraph

   [ 可先修改部分代码 再运行查看效果 ]

设置字体的大小 Set the size of the font

This example demonstrates how to set the size of a font.

Examples 实例:

Source Code to Run [www.fun52.com]

h1 {font-size: 150%}

h2 {font-size: 130%}

p {font-size: 100%}

This is header 1 www.fun52.com

This is header 2

This is a paragraph

   [ 可先修改部分代码 再运行查看效果 ]

设置字体的样式 Set the style of the font

This example demonstrates how to set the style of a font.

Examples 实例:

Source Code to Run [www.fun52.com]

h1 {font-style: italic}

h2 {font-style: normal}

p {font-style: oblique}

This is header 1

This is header 2 www.fun52.com

This is a paragraph

   [ 可先修改部分代码 再运行查看效果 ]

设置字体的形态 Set the variant of the font

This example demonstrates how to set the variant of a font.

Examples 实例:

Source Code to Run [www.fun52.com]

p.normal {font-variant: normal}

p.small {font-variant: small-caps}

This is a paragraph www.fun52.com

This is a paragraph

   [ 可先修改部分代码 再运行查看效果 ]

第 1 2 页

css教程:CSS字体font属性的应用  

相关文章:

你感兴趣的文章:

标签云: