
在b站某视频看到有张图是用赫斯缇雅替换了google logo,各种搜索+科学上网大约半小时,终于在巴哈姆特的一个帖子上找到了资源。上图就是我替换后的效果(手动斜眼
原理就是修改下css,替换背景图。下面放资源
Read More →
因为本站的logo经常换,换来换去也没几个满意的,所以写了个js,把现在有的图都放上,一个个切换。
<script type="text/javascript">
var headImg=["/f/head1.png","/f/head2.png","/f/head3.png"];
var headImgIndex=1;
function cc () {
headImgIndex=headImgIndex+1;
if (headImgIndex==headImg.length) {headImgIndex=0};
//alert(headImgIndex);
document.getElementById("logo").setAttribute("src", headImg[headImgIndex]);
}
$(document).ready(function () {
setInterval("cc()", 10000);
});
</script>
这样以后就可以随便折腾logo了←_←(雾
定时器最好在页面载入后使用,使用的function要先定义好。