首先引入某个字体,就应该有这么个字体(用户不需要有),下载字体放到项目的font文件夹下面
然后设置css
<style type="text/css">
@font-face {
font-family:'chunlian';
src: url('../font/chunlian.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
.chunlian{
font-family: 'chunlian';
font-size: 50px;
}
</style>