博客园美化
截止目前,只做了鼠标cursor样式和点击效果
cursor样式:
首先去网上找自己喜欢的鼠标样式。
我找的鼠标默认样式:
我找的链接悬停样式:
然后将样式上传至博客园文件:
然后进入博客园页面定制CSS中添加:注意把cursor图标改成自己的链接
body {cursor: url('https://files.cnblogs.com/files/blogs/745743/Arrow.ico'), auto;}
a:hover {cursor: url('https://files.cnblogs.com/files/blogs/745743/SizeAll.ico'), auto;}
(我只设置了这两个常用的,鼠标默认样式和链接悬停样式)
大功告成!
鼠标点击效果:
参考https://www.cnblogs.com/wkfvawl/p/9414180.html
将以下代码添加至页首HTML代码:
var a_idx = 0;
jQuery(document).ready(function($) {
$("body").click(function(e) {
var a = new Array("❤富强❤","❤民主❤","❤文明❤","❤和谐❤","❤自由❤","❤平等❤","❤公正❤","❤法治❤","❤爱国❤","❤敬业❤","❤诚信❤","❤友善❤");
var $i = $("<span></span>").text(a[a_idx]);
a_idx = (a_idx + 1) % a.length;
var x = e.pageX,
y = e.pageY;
$i.css({
"z-index": 999999999999999999999999999999999999999999999999999999999999999999999,
"top": y - 20,
"left": x,
"position": "absolute",
"font-weight": "bold",
"color": "rgb("+~~(255*Math.random())+","+~~(255*Math.random())+","+~~(255*Math.random())+")"
});
$("body").append($i);
$i.animate({
"top": y - 180,
"opacity": 0
},
1500,
function() {
$i.remove();
});
});
});