使用博客園快一星期了,看自己博客太單調了,就網上翻找別人的美化教程,自己鑽研一整天,現在整理分享出來。
首先要申請js權限,在設置選項,博客設置里, 一般十幾分鍾就審核好了,如圖
背景圖片設置
先選擇模板,選擇SimpleMemory。注:后面的css代碼是基於這個模板修改的
新建一個相冊,上傳背景圖片,盡量選清晰度高的。在相冊那里點擊查看圖片
會彈出一個很大的頁面,右鍵圖片,選擇復制圖片地址。
然后將以下css代碼粘貼到 博客設置的 頁面定制CSS代碼處,記得展開代碼。

#google_ad_c1, #google_ad_c2 {display:none;} .syntaxhighlighter a, .syntaxhighlighter div, .syntaxhighlighter code, .syntaxhighlighter table, .syntaxhighlighter table td, .syntaxhighlighter table tr, .syntaxhighlighter table tbody, .syntaxhighlighter table thead, .syntaxhighlighter table caption, .syntaxhighlighter textarea { font-size: 14px!important; } #home { opacity: 0.80; margin: 0 auto; width: 85%; min-width: 950px; background-color: #fff; padding: 30px; margin-top: 30px; margin-bottom: 50px; box-shadow: 0 2px 6px rgba(100, 100, 100, 0.3); } #blogTitle h1 { font-size: 30px; font-weight: bold; font-family: "Comic Sans MS"; line-height: 1.5em; margin-top: 20px; color: #515151; } #navList a:hover { color: #4C9ED9; text-decoration: none; } #navList a { display: block; width: 5em; height: 22px; float: left; text-align: center; padding-top: 18px; } #navigator { font-size: 15px; border-bottom: 1px solid #ededed; border-top: 1px solid #ededed; height: 50px; clear: both; margin-top: 25px; } .catListTitle { margin-top: 21px; margin-bottom: 10.5px; text-align: left; border-left: 10px solid rgba(82, 168, 236, 0.8); padding: 10px 0 14px 10px; background-color: #f5f5f5; } #ad_under_post_holder #google_ad_c1,#google_ad_c2{ display: none !important; } body { color: #000; background: url(https://upload.cnblogs.com/will-crop-avatar/1389656/1389656-20180531192221239-157765120.jpg?id=1527765712574744) fixed; background-size: 100%; background-repeat: no-repeat; font-family: "Helvetica Neue",Helvetica,Verdana,Arial,sans-serif; font-size: 12px; min-height: 101%; } #topics .postTitle { border: 0px; font-size: 200%; font-weight: bold; float: left; line-height: 1.5; width: 100%; padding-left: 5px; } div.commentform p{ margin-bottom:10px; } .comment_btn { padding: 5px 10px; height: 35px; width: 90px; border: 0 none; border-radius: 5px; background: #ddd; color: #999; cursor:pointer; font-family: "Lato", Helvetica Neue, Helvetica, Microsoft Yahei, 宋體, Arial, sans-serif; text-shadow: 0 0 1px #fff; display: inline !important; } .comment_btn:hover{ padding: 5px 10px; height: 35px; width: 90px; border: 0 none; border-radius: 5px; background: #258fb8; color: white; cursor:pointer; font-family: "Lato", Helvetica Neue, Helvetica, Microsoft Yahei, 宋體, Arial, sans-serif; text-shadow: 0 0 1px #fff; display: inline !important; } #commentform_title { background-image:none; background-repeat:no-repeat; margin-bottom:10px; padding:0; font-size:24px; } #commentbox_opt,#commentbox_opt + p { text-align:center; } .commentbox_title { width: 100%; } #tbCommentBody { font-family:'Microsoft Yahei', Microsoft Yahei, 宋體, sans-serif; margin-top:10px; max-width:100%; min-width:100%; background:white; color:#333; border:2px solid #fff; box-shadow:inset 0 0 8px #aaa; // padding:10px; height:250px; font-size:14px; min-height:120px; } .feedbackItem { font-size:14px; line-height:24px; margin:10px 0; padding:20px; background:#F2F2F2; box-shadow:0 0 5px #aaa; } .feedbackListSubtitle { font-weight:normal; } #blog-comments-placeholder, #comment_form { padding: 20px; background: #fff; -webkit-box-shadow: 1px 2px 3px #ddd; box-shadow: 1px 2px 3px #ddd; margin-bottom: 50px; } .feedback_area_title { margin-bottom: 15px; font-size: 1.8em; } .feedbackItem { border-bottom: 1px solid #CCC; margin-bottom: 10px; padding: 5px; background: rgb(248, 248, 248); } .color_shine {background: rgb(226, 242, 255);} .feedbackItem:hover {-webkit-animation-name: color_shine;-webkit-animation-duration: 2s;-webkit-animation-iteration-count: infinite;} #comment_form .title { font-weight: normal; margin-bottom: 15px; }
最后將紅色部分改成自己剛剛復制的圖片地址即可
background: url(https://images.cnblogs.com/cnblogs_com/anan-java/1632883/o_2001141329209ff071d9d35d3c0e2a219b68ec4de42d5b694161.jpg) fixed;
background-size: 100%;
background-repeat: no-repeat;
font-family: "Helvetica Neue",Helvetica,Verdana,Arial,sans-serif;
font-size: 12px;
轉載原文:https://www.cnblogs.com/quail2333/p/10777931.html
推薦和反對
右下角推薦和反對,只顯示推薦,將代碼復制到頁面定制CSS即可
/* adblock */ #ad_t2 { display: none; } .c_ad_block { display: none; } /*推薦和反對 粘在CSS框*/ #div_digg { padding: 10px; position: fixed; _position: absolute; z-index: 1000; bottom: 5px; right: 0; _right: 10px; border: 1px solid #D9DBE1; background-color: #FFFFFF; filter: alpha(Opacity=80); -moz-opacity: 0.8; opacity: 0.8; } .icon_favorite { background: transparent url('http://files.cnblogs.com/files/jackson0714/kj.gif') no-repeat 0 0; padding-left: 5px; } #blog_post_info_block a { text-decoration: none; color: #5B9DCA; padding: 3px; } .buryit { display: none; } .comment_bury { display: none; }
字體樣式
默認字體太小,不好看。自己定制字體樣式,復制以下代碼到 頁面定制CSS代碼

字體,css樣式 /* 文章標題樣式(這個不是markdown里的標題) */ #topics .postTitle a { /* color: #169fe6; */ font-family: Georgia,Times New Roman,Times,sans-serif, monospace; font-weight: bold; } /* 普通文字樣式 */ #cnblogs_post_body p { margin: 18px auto; color: #000; font-family: Georgia,Times New Roman,Times,sans-serif, monospace; font-size: 16px; text-indent: 0; } /* 標題樣式 */ #cnblogs_post_body h1 { font-family: Georgia,Times New Roman,Times,sans-serif, monospace; font-size: 32px; font-weight: bold; line-height: 1.5; margin: 10px 0; } #cnblogs_post_body h2 { font-family: Consolas, "Microsoft YaHei", monospace; font-size: 26px; font-weight: bold; line-height: 1.5; margin: 20px 0; } #cnblogs_post_body h3 { font-family: Georgia,Times New Roman,Times,sans-serif, monospace; font-size: 20px; font-weight: bold; line-height: 1.5; margin: 10px 0; } #cnblogs_post_body h4 { font-family: Georgia,Times New Roman,Times,sans-serif, monospace; font-size: 18px; font-weight: bold; margin: 10px 0; } /* 標題樣式設置結束 */ /* 去除雙下划線斜體樣式 */ em { font-style: normal; color: #000; } /* 無序列表 */ #cnblogs_post_body ul li { font-family: Georgia,Times New Roman,Times,sans-serif, monospace; color: #000; font-size: 16px; list-style-type: disc; } /* 有序列表 */ #cnblogs_post_body ol li { font-family: Georgia,Times New Roman,Times,sans-serif, monospace; color: #000; font-size: 16px; list-style-type: decimal; } /* 超鏈接 */ #cnblogs_post_body a:link { text-decoration: none; color: #002C99; } /* 引用背景 */ #topics .postBody blockquote { background: #fff3d4; border: none; border-left: 5px solid #f6b73c; margin: 0; padding-left: 10px; } /* 單行代碼 */ .cnblogs-markdown code { font-family: Consolas, "Microsoft YaHei", monospace !important; font-size: 16px !important; line-height: 20px; background-color: #f5f5f5 !important; border: 1px solid #ccc !important; padding: 0 5px !important; border-radius: 3px !important; line-height: 1.8; margin: 1px 5px; vertical-align: middle; display: inline-block; } /* 多行代碼, 引用 */ .cnblogs-markdown .hljs { font-family: Consolas, "Microsoft YaHei", monospace !important; font-size: 16px !important; line-height: 1.5 !important; padding: 5px !important; }
標題欄
頁面定制CSS代碼
/* 頭部 */ #header { position: relative; height: 280px; margin: 0; background: #020031; background: -moz-linear-gradient(45deg,#020031 0,#6d3353 100%); background: -webkit-gradient(linear,left bottom,right top,color-stop(0%,#020031),color-stop(100%,#6d3353)); background: -webkit-linear-gradient(45deg,#020031 0,#6d3353 100%); background: -o-linear-gradient(45deg,#020031 0,#6d3353 100%); background: -ms-linear-gradient(45deg,#020031 0,#6d3353 100%); background: linear-gradient(45deg,#020031 0,#6d3353 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#020031', endColorstr='#6d3353', GradientType=1); -webkit-box-shadow: inset 0 3px 7px rgba(0,0,0,.2),inset 0 -3px 7px rgba(0,0,0,.2); -moz-box-shadow: inset 0 3px 7px rgba(0,0,0,.2),inset 0 -3px 7px rgba(0,0,0,.2); box-shadow: inset 0 3px 7px rgba(0,0,0,.2),inset 0 -3px 7px rgba(0,0,0,.2); }
代碼美化
頁面定制CSS代碼
/*! Color themes for Google Code Prettify | MIT License | github.com/jmblog/color-themes-for-google-code-prettify */ .pln{color:#4d4d4c}ol.linenums{margin-top:0;margin-bottom:0;color:#8e908c}li.L0,li.L1,li.L2,li.L3,li.L4,li.L5,li.L6,li.L7,li.L8,li.L9{padding-left:1em;background-color:#fff;list-style-type:decimal!important;}@media screen{.str{color:#718c00}.kwd{color:#8959a8}.com{color:#8e908c}.typ{color:#4271ae}.lit{color:#f5871f}.pun{color:#4d4d4c}.opn{color:#4d4d4c}.clo{color:#4d4d4c}.tag{color:#c82829}.atn{color:#f5871f}.atv{color:#3e999f}.dec{color:#f5871f}.var{color:#c82829}.fun{color:#4271ae}} /*下面是我設置背景色,字體大小和字體*/ .cnblogs-markdown code{ background:#fff!important; } .cnblogs_code,.cnblogs_code span,.cnblogs-markdown .hljs{ font-size:16px!important; } .syntaxhighlighter a, .syntaxhighlighter div, .syntaxhighlighter code, .syntaxhighlighter table, .syntaxhighlighter table td, .syntaxhighlighter table tr, .syntaxhighlighter table tbody, .syntaxhighlighter table thead, .syntaxhighlighter table caption, .syntaxhighlighter textarea { font-size: 16px!important; } .cnblogs_code, .cnblogs_code span, .cnblogs-markdown .hljs{ font-family:consolas, "Source Code Pro", monaco, monospace !important; }
頁腳Html
<script src="http://files.cnblogs.com/files/flipped/prettify.js"></script> <script type="text/javascript"> (function() { $("pre").addClass("prettyprint"); prettyPrint(); })(); </script>
轉載原文:
https://www.cnblogs.com/henry-1202/p/10126164.html#_label7
下雪特效
頁面定制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; }
博客側邊欄公告處(要申請支持JS代碼)
<!--雪花--> <div class="Snow"> <canvas id="Snow"></canvas> </div> <script src="https://files.cnblogs.com/files/cn-suqingnian/snow.js"></script>
轉載原文:
https://www.cnblogs.com/graytido/p/10779199.html
公告移動文字
博客側邊欄公告處
<marquee><a href="#"><font color="blue" size="4">Happy New Year </marquee>
時鍾小人
博客側邊欄公告處
<hr> <embed allowscriptaccess="never" allownetworking="internal" invokeurls="false" src="https://files.cnblogs.com/files/mmzs/flashDate.swf" pluginspage="https://files.cnblogs.com/files/mmzs/flashDate.swf" type="application/x-shockwave-flash" quality="high" autostart="0" wmode="transparent" width="220" height="65" align="middle"> </div>
鼠標點擊愛心特效和煙花
愛心特效
博客側邊欄公告處

<!-- 愛心特效 --> <script type="text/javascript"> (function(window,document,undefined){ var hearts = []; window.requestAnimationFrame = (function(){ return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (callback){ setTimeout(callback,1000/60); } })(); init(); function init(){ css(".heart{width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,.heart:before{content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: absolute;}.heart:after{top: -5px;}.heart:before{left: -5px;}"); attachEvent(); gameloop(); } function gameloop(){ for(var i=0;i<hearts.length;i++){ if(hearts[i].alpha <=0){ document.body.removeChild(hearts[i].el); hearts.splice(i,1); continue; } hearts[i].y--; hearts[i].scale += 0.004; hearts[i].alpha -= 0.013; hearts[i].el.style.cssText = "left:"+hearts[i].x+"px;top:"+hearts[i].y+"px;opacity:"+hearts[i].alpha+";transform:scale("+hearts[i].scale+","+hearts[i].scale+") rotate(45deg);background:"+hearts[i].color; } requestAnimationFrame(gameloop); } function attachEvent(){ var old = typeof window.onclick==="function" && window.onclick; window.onclick = function(event){ old && old(); createHeart(event); } } function createHeart(event){ var d = document.createElement("div"); d.className = "heart"; hearts.push({ el : d, x : event.clientX - 5, y : event.clientY - 5, scale : 1, alpha : 1, color : randomColor() }); document.body.appendChild(d); } function css(css){ var style = document.createElement("style"); style.type="text/css"; try{ style.appendChild(document.createTextNode(css)); }catch(ex){ style.styleSheet.cssText = css; } document.getElementsByTagName('head')[0].appendChild(style); } function randomColor(){ return "rgb("+(~~(Math.random()*255))+","+(~~(Math.random()*255))+","+(~~(Math.random()*255))+")"; } })(window,document); </script>
煙花
頁腳
<script src="https://blog-static.cnblogs.com/files/yjlblog/cursor-effects.js"></script> <canvas width="1366" height="662" style="position: fixed; left: 0px; top: 0px; z-index: 2147483647; pointer-events: none;"></canvas>
背景動態線條
博客側邊欄公告處

<div style = "display:none;">動態線條</div> <script> !function(){ function n(n,e,t){ return n.getAttribute(e)||t } function e(n){ return document.getElementsByTagName(n) } function t(){ var t=e("script"),o=t.length,i=t[o-1]; return{ l:o,z:n(i,"zIndex",-1),o:n(i,"opacity",.5),c:n(i,"color","0,0,0"),n:n(i,"count",99) } } function o(){ a=m.width=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth, c=m.height=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight } function i(){ r.clearRect(0,0,a,c); var n,e,t,o,m,l; s.forEach(function(i,x){ for(i.x+=i.xa,i.y+=i.ya,i.xa*=i.x>a||i.x<0?-1:1,i.ya*=i.y>c||i.y<0?-1:1,r.fillRect(i.x-.5,i.y-.5,1,1),e=x+1;e<u.length;e++)n=u[e], null!==n.x&&null!==n.y&&(o=i.x-n.x,m=i.y-n.y, l=o*o+m*m,l<n.max&&(n===y&&l>=n.max/2&&(i.x-=.03*o,i.y-=.03*m), t=(n.max-l)/n.max,r.beginPath(),r.lineWidth=t/2,r.strokeStyle="rgba("+d.c+","+(t+.2)+")",r.moveTo(i.x,i.y),r.lineTo(n.x,n.y),r.stroke())) }), x(i) } var a,c,u,m=document.createElement("canvas"), d=t(),l="c_n"+d.l,r=m.getContext("2d"), x=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame|| function(n){ window.setTimeout(n,1e3/45) }, w=Math.random,y={x:null,y:null,max:2e4};m.id=l,m.style.cssText="position:fixed;top:0;left:0;z-index:"+d.z+";opacity:"+d.o,e("body")[0].appendChild(m),o(),window.onresize=o, window.onmousemove=function(n){ n=n||window.event,y.x=n.clientX,y.y=n.clientY }, window.onmouseout=function(){ y.x=null,y.y=null }; for(var s=[],f=0;d.n>f;f++){ var h=w()*a,g=w()*c,v=2*w()-1,p=2*w()-1;s.push({x:h,y:g,xa:v,ya:p,max:6e3}) } u=s.concat([y]), setTimeout(function(){i()},100) }(); </script> <div style = "display:none;"> 動態線條end</div>
小老鼠控件
博客側邊欄公告處
<!-- 小老鼠游戲控件 --> <div className="sidebarMouse"><object type="application/x-shockwave-flash" style="outline:none;" data="https://files.cnblogs.com/files/jingmoxukong/mouse.swf?up_bodyColor=f0e9cc&up_feetColor=D4C898&up_eyeColor=000567&up_wheelSpokeColor=DEDEDE&up_wheelColor=FFFFFF&up_waterColor=E0EFFF&up_earColor=b0c4de&up_wheelOuterColor=FF4D4D&up_snoutColor=F7F4E9&up_bgColor=F0E4E4&up_foodColor=cba920&up_wheelCenterColor=E4EB2F&up_tailColor=E6DEBE&" width="200" height="160"><param name="movie" value="https://files.cnblogs.com/files/jingmoxukong/mouse.swf?up_bodyColor=f0e9cc&up_feetColor=D4C898&up_eyeColor=000567&up_wheelSpokeColor=DEDEDE&up_wheelColor=FFFFFF&up_waterColor=E0EFFF&up_earColor=b0c4de&up_wheelOuterColor=FF4D4D&up_snoutColor=F7F4E9&up_bgColor=F0E4E4&up_foodColor=cba920&up_wheelCenterColor=E4EB2E&up_tailColor=E6DEBE&"><param name="AllowScriptAccess" value="always"><param name="wmode" value="opaque"></object></div>
旋轉立方體
博客側邊欄公告處

<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <style> /*最外層容器樣式*/ .wrap { width: 100px; height: 100px; margin: 150px; position: relative; } /*包裹所有容器樣式*/ /*設置transform-style: preserve-3d,讓其子元素在3D空間呈現*/ .cube { width: 50px; height: 50px; margin: 0 auto; transform-style: preserve-3d; transform: rotateX(-30deg) rotateY(-80deg); animation: rotate linear 20s infinite; } @-webkit-keyframes rotate { from { transform: rotateX(0deg) rotateY(0deg); } to { transform: rotateX(360deg) rotateY(360deg); } } .cube div { position: absolute; width: 200px; height: 200px; opacity: 0.8; transition: all .4s; } /*定義所有圖片樣式*/ .pic { width: 200px; height: 200px; } .cube .out_front { transform: rotateY(0deg) translateZ(100px); } .cube .out_back { transform: translateZ(-100px) rotateY(180deg); } .cube .out_left { transform: rotateY(-90deg) translateZ(100px); } .cube .out_right { transform: rotateY(90deg) translateZ(100px); } .cube .out_top { transform: rotateX(90deg) translateZ(100px); } .cube .out_bottom { transform: rotateX(-90deg) translateZ(100px); } /*定義小正方體樣式*/ .cube span { display: block; width: 100px; height: 100px; position: absolute; top: 50px; left: 50px; } .cube .in_pic { width: 100px; height: 100px; } .cube .in_front { transform: rotateY(0deg) translateZ(50px); } .cube .in_back { transform: translateZ(-50px) rotateY(180deg); } .cube .in_left { transform: rotateY(-90deg) translateZ(50px); } .cube .in_right { transform: rotateY(90deg) translateZ(50px); } .cube .in_top { transform: rotateX(90deg) translateZ(50px); } .cube .in_bottom { transform: rotateX(-90deg) translateZ(50px); } /*鼠標移入后樣式*/ .cube:hover .out_front { transform: rotateY(0deg) translateZ(200px); } .cube:hover .out_back { transform: translateZ(-200px) rotateY(180deg); } .cube:hover .out_left { transform: rotateY(-90deg) translateZ(200px); } .cube:hover .out_right { transform: rotateY(90deg) translateZ(200px); } .cube:hover .out_top { transform: rotateX(90deg) translateZ(200px); } .cube:hover .out_bottom { transform: rotateX(-90deg) translateZ(200px); } </style> </head> <body> <!-- 外層最大容器 --> <div class="wrap"> <!--包裹所有元素的容器--> <div class="cube"> <!--前面圖片 --> <div class="out_front"> <img src="https://i.loli.net/2018/05/03/5aeb0eef73838.jpg" class="pic" /> </div> <!--后面圖片 --> <div class="out_back"> <img src="https://i.loli.net/2018/05/03/5aeb0f2fb9a83.jpg" class="pic" /> </div> <!--左面圖片 --> <div class="out_left"> <img src="https://i.loli.net/2018/05/03/5aeb0f55411f0.jpg" class="pic" /> </div> <!--右面圖片 --> <div class="out_right"> <img src="https://i.loli.net/2018/05/03/5aeb0f79a1124.jpg" class="pic" /> </div> <!--上面圖片 --> <div class="out_top"> <img src="https://i.loli.net/2018/05/03/5aeb0f98a8b66.jpg" class="pic" /> </div> <!--下面圖片 --> <div class="out_bottom"> <img src="https://i.loli.net/2018/05/03/5aeb0fdd51b7e.jpg" class="pic" /> </div> <!--小正方體 --> <span class="in_front"> <img src="https://i.loli.net/2018/05/03/5aeb100223dd0.jpg" class="in_pic" /> </span> <span class="in_back"> <img src="https://i.loli.net/2018/05/03/5aeb101c2c24b.jpg" class="in_pic" /> </span> <span class="in_left"> <img src="https://i.loli.net/2018/05/03/5aeb1038127b5.jpg" class="in_pic" /> </span> <span class="in_right"> <img src="https://i.loli.net/2018/05/03/5aeb0dce1ca55.jpg" class="in_pic" /> </span> <span class="in_top"> <img src="https://i.loli.net/2018/05/03/5aeb1057bb167.jpg" class="in_pic" /> </span> <span class="in_bottom"> <img src="https://i.loli.net/2018/05/03/5aeb107514579.jpg" class="in_pic" /> </span> </div> </div> </body> </html>
轉載原文:
https://www.cnblogs.com/ECJTUACM-873284962/p/12274087.html
看板娘
這個我看過很多博客,把文件上傳,改成自己的。然后很多都不完整,要么沒圖,要么目錄不顯示。我這里直接引用博主的文件,右鍵路徑能打開就行。
博客側邊欄公告處
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Live2D</title> <link rel="stylesheet" type="text/css" href="https://files.cnblogs.com/files/kousak/waifu.css"/> <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script> </head> <body> <link rel="stylesheet" type="text/css" href="https://files.cnblogs.com/files/kousak/waifu.css"> <div class="waifu" id="waifu"> <div class="waifu-tips" style="opacity: 1;"></div> <canvas id="live2d" width="280" height="250" class="live2d"></canvas> <div class="waifu-tool"> <span class="fui-home"></span> <span class="fui-chat"></span> <span class="fui-eye"></span> <span class="fui-user"></span> <span class="fui-photo"></span> <span class="fui-info-circle"></span> <span class="fui-cross"></span> </div> </div> <script src="https://files.cnblogs.com/files/kousak/live2d.js"></script> <script src="https://files.cnblogs.com/files/kousak/waifu-tips.js"></script> <script type="text/javascript">initModel()</script> </body> </html> <link rel="stylesheet" type="text/css" href="https://files.cnblogs.com/files/yjlblog/flat-ui.min.css"/>
轉載原文:https://www.cnblogs.com/kousak/p/9726514.html
每日一言
博客側邊欄公告處

<meta charset="utf-8"/> <h2><B>一言(ヒトコト)</B></h2> <div class="daily a pome"> <div class="daily pome" id="qwq"></div> <script> var st=["<center>你不是一個人<br><center> ——lmh<br>", "<center>這不是bzoj原題嗎<br><center> ——hjw<br>", "<center>我去騙鑰匙啦~<br><center> ——yxy<br>", "<center>你無聊嗎,快去刷題。<br><center> ——lmh<br>", "<center>loj.ac<br><center> ——lmh<br>", "<center>想和zn談戀愛<br><center> ——lmh<br>", "<center>zc大人我錯了!<br><center> ——wjd<br>", "<center>zn:有沒有說出題人誰啊<br><center>yxy:好像是lxq??<br><center>zn:暴打出題人<center>yxy:老師!!!<br>", "<center>學習線性解決a+b問題<br><center> ——zn<br>", "<center>代碼已經給出,<br><center> 讀者自證不難。<br><center> ——lrj", "<center>啊<br><center>我要女裝!<br><center> ——zzx<br>", "<center>辛苦了~<br><center> ——lmh<br>", "<center>棒!<br><center> ——lmh<br>", "<center>學OI后悔三年<br><center>不學OI后悔一輩子/呲牙<br><center> ——zn<br>", "<center>又把1e3+7寫成1e4+7了……<br><center>干脆叫萬柒吧。。<br><center> ——yxy<br>", "<center>即得易見平凡,由上自證顯然,留作習題答案略,讀者自證不難。<br><center>反之亦然同理,推論自然成立,略去過程Q.E.D,由上可知證畢。<br><center> ——lca", "<center>我要讓zn提頭來見我<br><center> ——lmh<br>", "<center>這年頭 expert 很難么?<br><center> ——zn<br>", "<center>成為很厲害很厲害的人,最重要的,就是要熱血,永遠也不要讓你的血涼下去。<br><center> ——hzwer", "<center>高中的 OI 剛剛開始,希望不要那么快就凋零。兔紙的時間已經不多,請把自己選擇的路,好好走下去。<br><center> ——Bunnycxk", "<center>Who laughs last laughs best!<br><center> ——Emma", "<center>別哭,眼淚會凍住的。<br><center> ——那年那兔那些事兒" ]; var num; num=Math.floor((Math.random()*22)); document.write(st[num]); var cli; </script> <div style="font-size: 1em; text-align: center; line-height: 1.5em; display: none; " id="qwq"></div> <div style="text-align: right; margin-top: 15px; font-size: 0.9em; color: #666; display: none; " id="qwq"></div> </div>
轉載原文:
https://www.cnblogs.com/henry-1202/p/10126164.html#_label7
網易雲音樂
這里我直接引用別人的音樂,網易雲生成外鏈播放器,有一些歌由於版權保護無法生成。解決辦法參考:https://www.cnblogs.com/realwuxiong/p/11367563.html
博客側邊欄公告處
<!--網易雲播放器樣式--> <div class="menu-wrap"><embed src="//music.163.com/style/swf/widget.swf?sid=2232155814&type=0&auto=1&width=310&height=430" width="330" height="450" allowNetworking="all"></embed></div> <button class="menu-button" id="open-button" onclick="toggleMenu();"><img id="img_music" class="menu-rotation" src="http://images.cnblogs.com/cnblogs_com/cang12138/1219437/o_o_play.png"></button> <div class="content-wrap"></div> <script language="javascript" type="text/javascript"> var openbtn = document.getElementById( 'open-button' ), isOpen = false; function toggleMenu() { if( isOpen ) { $("body").removeClass("show-menu"); } else { $("body").addClass("show-menu"); } isOpen = !isOpen; } $(document).click(function (e) { var e = e || window.event; //瀏覽器兼容性 var elem = e.target || e.srcElement; if( isOpen && elem.id != "img_music") { $("body").removeClass("show-menu"); isOpen = !isOpen; } }) </script> <!--網易雲播放器樣式end-->
標題隱藏動態
博客側邊欄公告處
<script> document.addEventListener("visibilitychange", function () { if (document.hidden) { document.title="人呢?快回來"; } else { document.title="(ㄏ ̄▽ ̄)ㄏ終於回來啦"; setTimeout(function(){ document.title= "桃花換了酒錢的博客"; }, 2000); } }, false); </script>
轉載原文:https://www.cnblogs.com/graytido/p/11290388.html
小飛機置頂
頁首

<script> function func(){ var tag = document.getElementById('i1'); var content = tag.innerText; var f = content.charAt(0); var l = content.substring(1,content.length); var new_content = l + f; tag.innerText = new_content; } setInterval('func()',1600); </script> <span id="back-to-top"><a href="#top">返回頂部</a></span> <style> #back-top { position: fixed; bottom: 10px; right: 5px; z-index: 99; } #back-top span { width: 50px; height: 64px; display: block; background:url(http://images.cnblogs.com/cnblogs_com/seanshao/855033/o_rocket.png) no-repeat center center; } #back-top a{outline:none} </style> <script type="text/javascript"> $(function() { // hide #back-top first $("#back-top").hide(); // fade in #back-top $(window).scroll(function() { if ($(this).scrollTop() > 500) { $('#back-top').fadeIn(); } else { $('#back-top').fadeOut(); } }); // scroll body to 0px on click $('#back-top a').click(function() { $('body,html').animate({ scrollTop: 0 }, 800); return false; }); }); </script> <p id="back-top" style="display:none"><a href="#top"><span></span></a></p>
開頭目錄和版權信息
頁腳

<script type="text/javascript"> var setMyBlog = { setCopyright: function() { //設置版權信息,轉載出處自動根據頁面url生成 var info_str = '<p>作者:<a target="_blank">@桃花換了酒錢</a><br>'+ '本文為作者原創,轉載請注明出處:<a class="uri"></a></p><hr></hr>', info = $(info_str), info_a = info.find("a"), url = window.location.href; $(info_a[0]).attr("href","https://github.com/xdwkeep"); $(info_a[1]).attr("href",url).text(url); $("#cnblogs_post_body").prepend(info); }, setCodeRow: function(){ // 代碼行號顯示 var pre = $("pre.sourceCode"); //選中需要更改的部分 if(pre && pre.length){ pre.each(function() { var item = $(this); var lang = item.attr("class").split(" ")[1]; //判斷高亮的語言 item.html(item.html().replace(/<[^>]+>/g,"")); //將<pre>標簽中的html標簽去掉 item.removeClass().addClass("brush: " + lang +";"); //根據語言添加筆刷 SyntaxHighlighter.all(); }) } }, setAtarget: function() { // 博客內的鏈接在新窗口打開 $("#cnblogs_post_body a").each(function(){ this.target = "_blank"; }) }, setContent: function() { // 這個是在文章開頭的目錄,我不喜歡所以注釋了 // 根據h2、h3標簽自動生成目錄 var captions_ori = $("#cnblogs_post_body h2"), captions = $("#cnblogs_post_body h2,#cnblogs_post_body h3").clone(), content = $("<blockquote><h4>目錄</h4></blockquote>"); $("#cnblogs_post_body").prepend(content.append(captions)); var index = -1; captions.replaceWith(function(){ var self = this; if(self.tagName == "H2" || self.tagName == "h2"){ // 設置點擊目錄跳轉 index += 1; $('<a name="' + '_caption_' + index + '"></a>').insertBefore(captions_ori[index]); return '<a href="#_caption_' + index + '"><strong>' + self.innerHTML + '</strong></a><br>'; } else { return self.innerHTML + "<br>"; } }); }, runAll: function() { /* 運行所有方法 * setAtarget() 博客園內標簽新窗口打開 * setContent() 設置目錄 * setCopyright() 設置版權信息 * setCodeRow() 代碼行號顯示, */ this.setAtarget(); //this.setContent(); this.setCopyright(); //this.setCodeRow();//和黑色高亮主題沖突了,所以注釋了 } } setMyBlog.runAll(); </script> <script language="javascript" type="text/javascript"> // 生成目錄索引列表 // ref: http://www.cnblogs.com/wangqiguo/p/4355032.html // modified by: zzq function GenerateContentList() { var mainContent = $('#cnblogs_post_body'); var h2_list = $('#cnblogs_post_body h1');//如果你的章節標題不是h2,只需要將這里的h2換掉即可 if(mainContent.length < 1) return; if(h2_list.length>0) { var content = '<a name="_labelTop"></a>'; content += '<div id="navCategory" style="color:#152e97;">'; content += '<p style="font-size:18px;"><b>目錄</b></p>'; content += '<ul>'; for(var i=0; i<h2_list.length; i++) { var go_to_top = '<div style="text-align: right;"><a href="#_labelTop" style="color:#f68a33">Top</a><a name="_label' + i + '"></a></div>'; $(h2_list[i]).before(go_to_top); var h3_list = $(h2_list[i]).nextAll("h3"); var li3_content = ''; for(var j=0; j<h3_list.length; j++) { var tmp = $(h3_list[j]).prevAll('h2').first(); if(!tmp.is(h2_list[i])) break; var li3_anchor = '<a name="_label' + i + '_' + j + '"></a>'; $(h3_list[j]).before(li3_anchor); li3_content += '<li><a href="#_label' + i + '_' + j + '">' + $(h3_list[j]).text() + '</a></li>'; } var li2_content = ''; if(li3_content.length > 0) li2_content = '<li><a href="#_label' + i + '">' + $(h2_list[i]).text() + '</a><ul>' + li3_content + '</ul></li>'; else li2_content = '<li><a href="#_label' + i + '">' + $(h2_list[i]).text() + '</a></li>'; content += li2_content; } content += '</ul>'; content += '</div><p> </p>'; content += '<hr style="height:1px;border:none;border-top:1px dashed #0066CC;"/>'; if($('#cnblogs_post_body').length != 0 ) { $($('#cnblogs_post_body')[0]).prepend(content); } } } GenerateContentList(); </script>
轉載原文:https://www.cnblogs.com/wudongwei/p/8886842.html
右下角目錄欄
頁腳
<script src="http://cdn.bootcss.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> <link href="http://files.cnblogs.com/files/anan-java/marvin.nav.my1502.css" rel="stylesheet"> <script type="text/javascript" src="http://files.cnblogs.com/files/anan-java/marvin.cnblogs.js"></script> <script type="text/javascript" src="http://files.cnblogs.com/files/anan-java/marvin.nav.my1502.WhiteTears.js"></script>
轉載原文:https://www.cnblogs.com/WhiteTears/p/8824544.html
結語
我博客的美化方案就已經給大家了,雖說沒多么好看,但至少能讓你們的博客與眾不同。
還有代碼高亮,天氣等我還不知怎么用。包括MarkDown語法寫博客,后續有完善的,會在這里更新。