使用baffle.js动态混淆文本与显示

先安装依赖

npm install --save baffle

引入baffle依赖包

import baffle from "baffle";

设置dom混淆与显示

    const b = baffle("span", {
      characters: "░░▓ ░█▒▒▓ ██▒█ █░ ▓▓▓░ ██░░ ███ ██▓",
      speed: 75
    });
    b.reveal(1000);

官方文档

https://camwiegert.github.io/baffle/

在NUXT.JS使用是没问题的,所以在vue里使用也应该不会有问题

posted @ 2021-08-23 09:21  松岛川树  阅读(32)  评论(0编辑  收藏  举报