web项目中需要用到LCD液晶字体显示数值怎么办?
- 到 dafont下载.ttf格式字体
-
下载.ttf字体文件到本地,放在font字体文件中
-
在css文件中引入字体 一般在整体css文件中引入,例如react项目的index.scss
@font-face {
font-family: 'led regular';
src: url('./assets/font/DS-DIGI.TTF');
}
- 使用字体
.value {
font-family: 'led regular';
letter-spacing: 4px;
color: #00FFE4;
}