一、@font-face是什么如何使用@font-face?

  • @font-face是CSS3属性,用来指定字体样式的。指定字体名为xxx的字体,并指定在哪里可以找到它的url。实例如下:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"> 
<title>@font-face</title> 
<style> 
@font-face
{
    font-family: myFirstFont;
    src: url('Sansation_Light.ttf')
        ,url('Sansation_Light.eot'); /* IE9 */
}

div
{
    font-family:myFirstFont;
}
</style>
</head>
<body>

<div>
使用 CSS3,网站终于可以使用字体以外的预先选择“合法”字体
</div>

</body>
</html>
View Code

相关文章:

  • 2021-10-10
  • 2021-08-10
  • 2021-08-24
  • 2022-12-23
  • 2021-09-29
  • 2021-11-12
  • 2021-11-12
  • 2021-10-09
猜你喜欢
  • 2022-12-23
  • 2021-06-24
  • 2022-12-23
  • 2021-12-01
  • 2022-12-23
  • 2021-09-18
  • 2022-12-23
相关资源
相似解决方案