博客园美化教程
页面整体布局
这个效果 ,参考这个博客
https://bndong.github.io/Cnblogs-Theme-SimpleMemory/v1.1/#/
可以设置很多东西, 友情链接,广告
页面妹子的代码:
css样式
canvas#live2dcanvas {
border: 0 !important;
left: 0;
}
js代码
<script src="https://eqcn.ajz.miesnfu.com/wp-content/plugins/wp-3d-pony/live2dw/lib/L2Dwidget.min.js"></script>
<script>
L2Dwidget.init({
"model": {
jsonPath: "https://unpkg.com/live2d-widget-model-shizuku@1.0.5/assets/shizuku.model.json",
"scale": 1
},
//定义位置
"display": {
"position": "right",
"width": 80,
"height": 150,
"hOffset": 0,
"vOffset": -20
},
"mobile": {
"show": true,
"scale": 0
},
"react": {
"opacityDefault": 0.7,
"opacityOnHover": 0.2
}
});
</script>
页面鼠标点击效果代码
<script type="text/javascript">
/* 鼠标特效 */
var a_idx = 0;
jQuery(document).ready(function($) {
$("body").click(function(e) {
var a = new Array("❤CTF❤","❤二进制安全❤","❤逆向❤","❤LINUX❤","❤WINDOWS❤","❤PWN❤");
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": 999999,
"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();
});
});
});
</script>
javascript 代码加多了,不好,很容易卡顿