字蛛的安装与使用

2019-10-18  本文已影响0人  有事直接说

前提python
1.安装

npm install font-spider -g

2.下载字体文件

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <div class="Calculus">123456789%</div>
</body>
</html>
<style>

/*声明 WebFont*/
@font-face {
  font-family: 'Calculus';
  src: url('../font/pinghei.eot');
  src:
    url('../CalculusRegular/CalculusLCDOblique.eot?#font-spider') format('embedded-opentype'),
    url('../CalculusRegular/CalculusLCDOblique.woff') format('woff'),
    url('../CalculusRegular/CalculusLCDOblique.ttf') format('truetype'),
    url('../CalculusRegular/CalculusLCDOblique.svg') format('svg');
  font-weight: normal;
  font-style: normal;
}

/*使用选择器指定字体*/
 .Calculus{
    font-family: 'pinghei';
}
</style>

4.>font-spider test.html

上一篇 下一篇

猜你喜欢

热点阅读