美化博客園
阿新 • • 發佈:2018-07-22
cit ont ali pts ani .get button -s first
設置與我聯系
側邊欄公告代碼
<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=xxxxxxxxxxx&site=qq&menu=yes"> <img align="absmiddle" border="0" src="http://wpa.qq.com/pa?p=2:xxxxxxxxxxxx:41 &r=0.30709030851721764" alt="歡迎與我聯系" title="歡迎與我聯系"> </a>
將xxxxx部分改為你QQ號即可
設置標題樣式
頁面定制CSS代碼
#cnblogs_post_body { color: black; font: 0.875em/1.5em "微軟雅黑" , "PTSans" , "Arial" ,sans-serif; font-size: 15px; } #各個等級標題的顏色樣式 #cnblogs_post_body h1 { background: #2B6695; border-radius: 6px 6px 6px 6px; box-shadow: 0 0 0 1px #5F5A4B, 1px 1px 6px 1px rgba(10, 10, 0, 0.5); color: #FFFFFF; font-family: "微軟雅黑" , "宋體" , "黑體" ,Arial; font-size: 23px; font-weight: bold; height: 25px; line-height: 25px; margin: 18px 0 !important; padding: 8px 0 5px 5px; text-shadow: 2px 2px 3px #222222; } #cnblogs_post_body h2 { background: #008eb7; border-radius: 6px 6px 6px 6px; box-shadow: 0 0 0 1px #5F5A4B, 1px 1px 6px 1px rgba(10, 10, 0, 0.5); color: #FFFFFF; font-family: "微軟雅黑" , "宋體" , "黑體" ,Arial; font-size: 20px; font-weight: bold; height: 25px; line-height: 25px; margin: 18px 0 !important; padding: 8px 0 5px 5px; text-shadow: 2px 2px 3px #222222; } #cnblogs_post_body h3 { background: #399ab2; border-radius: 6px 6px 6px 6px; box-shadow: 0 0 0 1px #5F5A4B, 1px 1px 6px 1px rgba(10, 10, 0, 0.5); color: #FFFFFF; font-family: "微軟雅黑" , "宋體" , "黑體" ,Arial; font-size: 18px; font-weight: bold; height: 25px; line-height: 25px; margin: 18px 0 !important; padding: 8px 0 5px 5px; text-shadow: 2px 2px 3px #222222; } #cnblogs_post_body h4{ background: #2B6600; border-radius: 6px 6px 6px 6px; box-shadow: 0 0 0 1px #5F5A4B, 1px 1px 6px 1px rgba(10, 10, 0, 0.5); color: #FFFFFF; font-family: "微軟雅黑" , "宋體" , "黑體" ,Arial; font-size: 16px; font-weight: bold; height: 24px; line-height: 23px; margin: 12px 0 !important; padding: 5px 0 5px 10px; text-shadow: 2px 2px 3px #222222; } #頁面中a標簽鼠標位置 #cnblogs_post_body h2:a{ color: rgb(235, 235, 235); } #cnblogs_post_body h2 a:hover{ color: rgb(255, 102, 0); } #頁面中標題位置 #cnblogs_post_body h1{ color: rgb(235, 235, 235); } #cnblogs_post_body h1:hover{ color: rgb(255, 102, 0); } #cnblogs_post_body h2{ color: rgb(235, 235, 235); } #cnblogs_post_body h2:hover{ color: rgb(255, 102, 0); } #cnblogs_post_body h3{ color: rgb(235, 235, 235); } #cnblogs_post_body h3:hover{ color: rgb(255, 102, 0); } #cnblogs_post_body h4{ color: rgb(235, 235, 235); } #cnblogs_post_body h4:hover{ color: rgb(255, 102, 0); }
設置打賞
頁首Html代碼
<!--打賞 Start--> <script> window.tctipConfig = { staticPrefix: "http://static.tctip.com", buttonImageId: 5, buttonTip: "dashang", list:{ alipay: { qrimg: "http://images.cnblogs.com/cnblogs_com/HByang/1259487/t_QQ%e6%88%aa%e5%9b%be20180721211435.jpg"}, weixin: { qrimg: "http://images.cnblogs.com/cnblogs_com/HByang/1259487/t_QQ%e6%88%aa%e5%9b%be20180721210757.jpg"}, } }; </script> <script src="http://static.tctip.com/js/tctip.min.js" />
添加快速置頂小火箭
頁首Html代碼
<!--添加快速置頂小火箭--> <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"> (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>
美化博客園