SOURCE

console 命令行工具 X clear

                    
>
console
/**
 * @type {HTMLCanvasElement}
 */
const canvas = document.getElementById("canvas");
const ctx = canvas.getContext("2d");

const { width, height } = canvas;

const str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".split("");
const len = str.length;
const arr = new Array(Math.ceil(width / 10)).fill(0);

const draw = () => {
    ctx.fillStyle = "rgba(0, 0, 0, 0.05)";
    ctx.fillRect(0, 0, width, height);
    ctx.fillStyle = "#0f0";
    arr.forEach((i, index) => {
        ctx.fillText(str[Math.floor(len * Math.random())], index * 10, i + 10);
        arr[index] = i > height || i > 8888 * Math.random() ? 0 : i + 10;
    });
    window.requestAnimationFrame(draw)
};

draw();
<canvas id="canvas" width="500" height="500"></canvas>
#canvas {
    width: 500px;
    height: 500px;
    background: black;
}