愚人节整蛊代码:你屏幕上有根毛
侧边栏壁纸
  • 累计撰写 12 篇文章
  • 累计收到 0 条评论

愚人节整蛊代码:你屏幕上有根毛

So_Lua
2023-07-12 / 0 评论 / 31 阅读 / 正在检测是否收录...
/***
 * 愚人节彩蛋 - 你屏幕上有根毛
 * 出处:https://www.baidu.com/s?ie=UTF-8&wd=%E6%84%9A%E4%BA%BA%E8%8A%82
 */
!function() {
    var bottom = Math.floor(60 * Math.random()),
        right = Math.floor(50 * Math.random()),
        rotate = Math.floor(360 * Math.random());
    var foolsEgg = document.createElement("img");
    foolsEgg.src = "https://cdn.2su.cc/blog/b028c278cbb84660f8bde79d819bc30b.png";
    foolsEgg.style.position = "fixed"; 
    foolsEgg.style.bottom = "".concat(bottom, "%");
    foolsEgg.style.right = "".concat(right, "%"); 
    foolsEgg.style.zIndex = "9999"; 
    foolsEgg.style.pointerEvents = "none";
    foolsEgg.style.width = "40%";
    foolsEgg.style.maxWidth = "190px";
    foolsEgg.style.transform = "".concat("rotate(", rotate, "deg)"); 
    document.body.append(foolsEgg);
} ();
1

评论 (0)

取消