有很多的好看的$java\ scripot$
可以大大的增加$blog$的好看度。
这里,本宝宝就列举几个
upd:不定期更新
1.有木有觉得背景的小姐姐和雪花特效极其的配啊啊啊!!!
页面定制CSS插入以下代码:
/*雪花css*/ #Snow{ position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 99999; background: rgba(255,255,240,0.1); pointer-events: none; } /*雪花css end*/
侧边栏插入如下代码:前提是支持js
<div class="Snow"> <canvas id="Snow"></canvas> </div> <script src="https://files.cnblogs.com/files/cn-suqingnian/snow.js"></script>
2.公告里的访客数量(先去这里 注册一个新的数量记录)
侧边栏插入如下代码
访客数量:<br> <img src="http://cc.amazingcounters.com/counter.php?i=3222245&c=9667048"/> <br>
<#!src里面插入url链接,添加时删除此行>
3.浏览器切换
页首$html$
<script> // 浏览器标题切换 var OriginTitile = document.title; // 保存之前页面标题 var titleTime; document.addEventListener('visibilitychange', function(){ if (document.hidden){ document.title ='你不要我了么?qwq'; // 切出文字 clearTimeout(titleTime); }else{ document.title = '我喜欢你啊。'; // 切入文字 titleTime = setTimeout(function() { document.title = OriginTitile; }, 1000); // 2秒后恢复原标题 } }); </script>
4.鼠标点击特效
页脚$html$
<script type="text/javascript" language="javascript"> var getRandomColor = function(){ return '#' + (function(color){ return (color += '0123456789abcdef'[Math.floor(Math.random()*16)]) && (color.length == 6) ? color : arguments.callee(color); })(''); }
//随机生成颜色 onload = function() { var click_cnt = 0; var $html = document.getElementsByTagName("html")[0]; var $body = document.getElementsByTagName("body")[0]; $html.onclick = function(e) { var $elem = document.createElement("b"); $elem.style.color = getRandomColor(); $elem.style.zIndex = 9999; $elem.style.position = "absolute"; $elem.style.select = "none"; var x = e.pageX; var y = e.pageY; // var st= new Array("\u82CF","\u537F","\u5FF5","\u662F","\u6700","\u83DC","\u7684"); //苏卿念是OI最菜的苏卿念是最菜的 // var st= new Array("\u6211","\u559C","\u6B22","\u4F60","\u554A","\u2026","\u2026"); //我喜欢你啊……我喜欢你啊…… var st= new Array("\u4F60","\u7279","\u522B","\u597D","\uFF0C","\u6211","\u559C","\u6B22","\u4F60","\u3002"); //你特别好,我喜欢你。你特别好,我喜欢你。
//按照如上的例子添加,必须转utf-8
$elem.style.left = (x - 10) + "px"; $elem.style.top = (y - 20) + "px"; //$elem.innerText = "OωO"; clearInterval(anim); $elem.innerText = st[click_cnt%10];
//模数是总共的字数
click_cnt++; $elem.style.fontSize = Math.random() * 10 + 15 + "px"; var increase = 0; var anim; setTimeout(function() { anim = setInterval(function() { if (++increase == 200) {
//上升高度 clearInterval(anim); $body.removeChild($elem); } $elem.style.top = y - 20 - increase*2 + "px"; //increas*速度,数越大,速度越快. $elem.style.opacity = (200 - increase*2) / 120; }, 8); }, 70); $body.appendChild($elem); }; }; </script>