Rinvay.H Blog

Typecho自定义任何主题使用emoji表情

为什么这样做

引入JS/CSS

<script src="https://cdn.bootcss.com/emojify.js/1.1.0/js/emojify.min.js"></script>
<link href="https://cdn.bootcss.com/emojify.js/1.1.0/css/basic/emojify.min.css" rel="stylesheet">
<script type="text/javascript">
    emojify.setConfig({
        img_dir: "//cdn.bootcss.com/emojify.js/1.1.0/images/basic",
        blacklist: {
            'ids': [],
            'classes': ['no-emojify'],
            'elements': ['^script$', '^textarea$', '^pre$', '^code$']
        },
    });
    emojify.run();
</script>

测试

:grimacing: :confused: :hushed: :expressionless: :unamused: :sweat_smile::sun_with_face: :full_moon_with_face: :new_moon_with_face: :new_moon: :jp: :kr: :cn: :us: :large_blue_circle: :libra: :scorpius: :sagittarius: :capricorn:

当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »