From 3489249f617963e4875af9e0fd946b746eae6e60 Mon Sep 17 00:00:00 2001 From: Wayne <54445994+Waynenet@users.noreply.github.com> Date: Thu, 30 Jun 2022 16:23:38 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF=E5=8E=BB=E9=99=A4?= =?UTF-8?q?=E9=BC=A0=E6=A0=87=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移动端去除鼠标样式 --- js/main.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/js/main.js b/js/main.js index 962dea6..84535c8 100644 --- a/js/main.js +++ b/js/main.js @@ -40,6 +40,12 @@ body.addEventListener('mousemove', (e) => { }); }); +//移动端去除鼠标样式 +switch (true) { + case navigator.userAgent.indexOf('Mobile') > 0: + $('#g-pointer-2').css("display", "none"); +} + //加载完成后执行 window.addEventListener('load', function () { @@ -389,4 +395,4 @@ var content = ` Github: https://github.com/imsyy/home ` console.log(`%c${title1} %c${title2} -%c${content}`, styleTitle1, styleTitle2, styleContent) \ No newline at end of file +%c${content}`, styleTitle1, styleTitle2, styleContent)