国产机是linux系统,常常不能正常显示emoji表情
解决方案:前端引入字体资源,这里使用的是 noto-emoji(linux 火狐浏览器不支持)
emoji字体下载地址:https://gitee.com/songboy/noto-emoji
git clone https://gitee.com/songboy/noto-emoji.git
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>emoji表情测试</title>
<style type="text/css">
@font-face {
font-family: 'NotoColorEmoji';
src: url('./font/NotoColorEmoji.ttf') format('truetype');
}
</style>
</head>
<body>
<span style="font-family: 'NotoColorEmoji'">Emojis: ????</span>
</body>
</html>