Closed mjsoftking closed 9 months ago
2.10.2
1.1.1
js代码如下:
var a_idx = 0; jQuery(document).ready(function($) { $("body").click(function(e) { var a = new Array("富强", "民主", "文明", "和谐", "自由", "平等", "公正", "法治", "爱国", "敬业", "诚信", "友善"); var $i = $("<span/>").text(a[a_idx]); a_idx = (a_idx + 1) % a.length; var x = e.pageX, y = e.pageY; let scrolly = window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop; y = y - scrolly; $i.css({ "z-index": 999, "top": y - 20, "left": x, "position": "fixed", "font-weight": "bold", "color": /*"#ff6651" 随机颜色写法:*/ "rgb(" + ~~(255 * Math.random()) + "," + ~~(255 * Math.random()) + "," + ~~(255 * Math.random()) + ")" }); $("body").append($i); $i.animate({ "top": y - 180, "opacity": 0 }, 1500, function() { $i.remove(); }); }); });
效果参看博客: https://www.sw0.top
网上找的,可以作为主题自带,或者复制上述代码到定制主题 - 内嵌JS中并关闭主题中鼠标点击特效,避免显示多个点击效果。
定制主题 - 内嵌JS
No response
你当前使用的 Halo 版本
2.10.2
你当前使用的 Dream 版本
1.1.1
描述一下此特性
js代码如下:
效果参看博客: https://www.sw0.top
网上找的,可以作为主题自带,或者复制上述代码到
定制主题 - 内嵌JS
中并关闭主题中鼠标点击特效,避免显示多个点击效果。附加信息
No response