这次对博客进行了美化,主要有:

  1. 背景随机图片
  2. 增加时钟,音乐等
  3. 更改标签之间的距离
  4. 网页模板更换

第一次弄,大部分借鉴于各位园友,实际上对CSS/HTML 也不是很懂--萌新求照顾,但“万丈高楼平地起”,后期加油,毕竟前端挺好玩的。

附上源码:

<!-- 添加公告栏时钟 -->
<div id="clockdiv">
<canvas id="dom" width="120" height="120">时钟canvas</canvas>
</div>
<script type="text/javascript" src="https://files.cnblogs.com/files/shwee/clock.js"></script>
<p>签名:</p>
<blockquote ><b  style="front-family:verdana;color:red"><br />"书不记,熟读可记;义不精,细思可精;惟有志不立,直是无着力处。"<br /><br /></b></blockquote>
<hr />
<!--把“XXXXXXXX”替换成你的QQ号-->
<a target="_blank" href="tencent://AddContact/?fromId=45&fromSubId=1&subcmd=all&uin=1024593536" target="_blank""><img border="0" src="http://wpa.qq.com/pa?p=1:10245935:13" alt="有事您Q我" title="有事您Q我"></a>
<embed src="//music.163.com/style/swf/widget.swf?sid=29544794&type=2&auto=1&width=320&height=66" width="340" height="86"  allowNetworking="all"></embed>
<p>我的微信在这~WMITLV【加好友请注明姓名和来源。】</p>
<address>
Written by <a href="mailto:1024593536@qq.com">Mayfly</a><p>(点击发送邮件)</p><br />
</address>
<a href="https://info.flagcounter.com/XRTq"><img src="https://s04.flagcounter.com/count2/XRTq/bg_FFFFFF/txt_0A0202/border_CCCCCC/columns_2/maxflags_10/viewers_0/labels_0/pageviews_0/flags_0/percent_0/" alt="Flag Counter" border="0"></a>
<!-- 为页面添加爱心特效 -->
<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>
<link href="http://lib.baomitu.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="http://lib.baomitu.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
</div></div>

侧边公告栏

body {
color: #000;
background: url(https://www.cnblogs.com/images/cnblogs_com/Mayfly-nymph/1233628/o_pic2.jpg) fixed;
background-size: cover;
background-repeat: repeat;
font-family: "微软雅黑","Helvetica Neue",Helvetica,Verdana,Arial,sans-serif;
font-size: 12px;
min-height: 101%;
}
#blogTitle h1 {
font-size: 50px;
font-family: Consolas;
font-weight: bold;
font-style: italic;
margin-top: 20px;
}
.catListTitle {
margin-top: 21px;
margin-bottom: 10.5px;
text-align: left;
border-left: 10px solid rgba(82, 168, 236, 0.8);
padding: 5px 0 5px 10px;
background-color: rgba(245,245,245,0.3);
}
#home {
margin: 0 auto;
width: 65%;
min-width: 950px;
background-color: rgba(255,255,255,0.8);
padding: 30px;
margin-top: 50px;
margin-bottom: 50px;
box-shadow: 0 2px 6px rgba(100, 100, 100, 0.3);
}
.newsItem, .catListEssay, .catListLink, .catListNoteBook, .catListTag, .catListPostCategory, .catListPostArchive, .catListImageCategory, .catListArticleArchive, .catListView, .catListFeedback, .mySearch, .catListComment, .catListBlogRank, .catList, .catListArticleCategory {
background: none;
margin-bottom: 35px;
word-wrap: break-word;
}
#blog-calendar td {
font-size: 12px;
font-family: Consolas;
}
.input_my_zzk {
border: 1px solid #ccc;
background: none;
width: 100%;
height: 25px;
padding-right: 30px;
padding-left: 5px;
outline: 0;
}
.CalDayHeader {
background: rgba(245,245,245,0.3) !important;
font-weight: 100;
color: #5E5F63;
}
.CalTitle {
background: none;
width: 100%;
height: 25px;
text-align: center;
font-size: 14px;
font-weight: bold;
padding: 5px 0;
color: #FFF;
}
.CalTitle td {
background: rgba(245,245,245,0.3) !important;
border: 0px !important;
color: #5E5F63;
font-family: "Comic Sans MS";
}
a:link {
color: cornflowerblue;
}
a:visited {
color: cornflowerblue;
}
a:hover {
color:cadetblue;
}
a:active {
color:black;
}
.CalTodayDay {
background: rgba(247,247,247,0.3) !important;
color: #FFF;
font-weight: bold;
}
.cnblogs_code {
background-color: rgba(247,247,247,0.3);
font-family: Consolas !important;
font-size: 12px!important;
border: 1px solid #ccc;
padding: 5px 10px;
overflow: auto;
margin: 5px 0;
color: #000;
}
.cnblogs_code div {
background-color: rgba(247,247,247,0.3);
}
.cnblogs_code_collapse {
border-right: gray 1px solid;
border-top: gray 1px solid;
border-left: gray 1px solid;
border-bottom: gray 1px solid;
background-color: rgba(247,247,247,0.3);
padding: 2px;
}
blockquote {
background: rgba(247,247,247,0.3);
border: 2px solid #efefef;
padding-left: 10px;
padding-right: 10px;
padding-top: 5px;
padding-bottom: 5px;
margin-top: 10px;
margin-bottom: 10px;
}
div.commentform input.author, div.commentform input.email, div.commentform input.url {
background-image: url(http://static.cnblogs.com/images/icon_form.gif);
border: 1px solid white !important;
padding: 4px 4px 4px 30px;
width: 300px;
font-size: 13px;
background-color: rgba(247,247,247,0.3);
}
#comment_form_container .comment_textarea {
width: 362px;
height: 200px;
font-size: 13px;
padding: 8px;
margin-bottom: 10px;
color: #555;
border: 1px solid white;
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
background-color: rgba(247,247,247,0.3);
}
.cnblogs_code pre {
font-family: Consolas !important;
font-size: 12px!important;
word-wrap: break-word;
white-space: pre-wrap;
}
.cnblogs_code span {
font-family: Consolas !important;
font-size: 12px!important;
line-height: 1.5!important;
}
div#cnblogs_c2 {
display: none;
}
div#cnblogs_c1 {
display: none;
}
div#under_post_news {
display: none;
}
div#ad_t2 {
display: none;
}
div#under_post_kb {
display: none;
}
.feedbackItem {
margin: 10px 5px 0px;
padding: 5px;
box-shadow: 0 0 10px 0 #AAA;
}
#topics .postTitle {
font-size:230%;
}
.postTitle a:link, .postTitle a:visited, .postTitle a:active {
color: #21759b;
transition: all 0.4s cubic-bezier(0, 0, 0.12, 1) 0s;
}
#cnblogs_post_body h2 {
border-left: 10px solid rgba(82, 168, 236, 0.3);
background: rgba(247,247,247, 0.3);
padding: 3px 10px;
}
#cnblogs_post_body h3{
border-left: 5px solid rgba(0, 235, 255, 0.3);
padding: 2px 5px;
background: rgba(247,247,247,0.3);
}
#cnblogs_post_body h4{
border-left: 5px solid rgba(222, 101, 114,0.3);
padding-left: 5px;
background: rgba(247,247,247,0.3);
}
#cnblogs_post_body h1{
background: rgba(247,247,247,0.3);
border-left: 15px solid rgba(0, 122, 255, 0.3);
padding: 3px 10px;
font-size: 175%;
border-right: 15px solid rgba(0, 122, 255, 0.3);
}
.buryit {
display: none;
}
#div_digg {
float: right;
position: fixed;
width: auto;
bottom: 10px;
left: 70%;
margin-bottom: 10px;
background: rgba(247,247,247,0.3);
margin-right: 30px;
font-size: 12px;
box-shadow: 0 0 10px 0 #AAA;
padding: 10px;
border: 2px solid rgba(82, 168, 236, 0.8);
text-align: center;
margin-top: 10px;
}
textarea {
background: rgba(247,247,247,0.3);
}
body{cursor:url('http://fq.wc.lt//up/1499563659.cur'),auto;}
A{cursor:url('http://fq.wc.lt//up/1499563659.cur'),auto;}
#navigatorTitleDiv
{
padding: 3px;
position: fixed;
top:244px;
right:304px;
font-weight:bold;
cursor:pointer;
background-color: antiquewhite;
}
#navigatorDiv
{
border-style:double;
padding: 10px;
padding-top:30px;
position: fixed;
top:240px;
right:300px;
background-color: antiquewhite;
}
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Three.js自定义图像悬停</title>
<style>
html {margin: 0;
padding: 0;
}
html,
body {width: 100%;
height: 100%;
margin: 0px;
padding: 0px;
font-family: 'Lato', sans-serif;
font-size: 16px;
}
.social-icon a {position: fixed;
background: white;
color: white;
display: inline-block;
width: 100px;
height: 100px;
transform: translate(-50%, -50%) rotate(45deg);
transition: .15s ease;
z-index: 30;
}
.social-icon i {position: absolute;
font-size: 1.8em;
pointer-events: none;
z-index: 1000;
}
.social-icon:hover a {transform: translate(-50%, -50%) rotate(45deg) scale(1.05);
}
.youtube a {top: 100%;
left: 0%;
box-shadow: 0px 0px 15px 5px rgba(230, 33, 23, 0.5);
}
.youtube i {left: 8px;
bottom: 8px;
color: #E62117;
}
.github a {top: 100%;
left: 100%;
box-shadow: 0px 0px 15px 3px rgba(126, 126, 126, 0.5);
}
.github i {right: 8px;
bottom: 8px;
}
#canvas-container-1{height: 100%;
width: 100%;
background: black;
}
#canvas-1{display: block;
position: relative;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
#site-link{color: #0099ff;
display: inline-block;
position: fixed;
bottom: 4%;
left: 50%;
transform: translate(-50%, 0%);
font-variant: small-caps;
}
/* 定制返回顶部按键 */
#toTop {background: url(//http://images.cnblogs.com/cnblogs_com/shwee/1218109/o_toTop.bmp) no-repeat 0px top;
width: 57px;
height: 57px;
overflow: hidden;
position: fixed;
right: 180px;
bottom: 20px;
cursor: pointer;
}
/* 定制推荐和反对按键 */
#div_digg{position:fixed;
bottom:-10px;
width:120px;
right:20px;
box-shadow: 0 0 6px #0000FF;
border:2px solid #FF0000;
padding:4px;
background-color:#fff;
border-radius:4px 4px 4px 4px !important;
}
.icon_favorite {background: transparent url('http://images.cnblogs.com/cnblogs_com/shwee/1218109/o_kj.gif') no-repeat 0 0;
padding-left: 15px;
}
#blog_post_info_block a {text-decoration: none;
color: #5B9DCA;
padding: 3px;
}
/* 定制公告栏时钟位置 */
#clockdiv {/* left, center, right */
text-align: center;
}
<!-- 为页面添加爱心特效 -->
<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.οnclick==="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>

页面定制CSS代码

<!DOCTYPE html>
<html>
<body>
<style>
#Canvas{position:fixed;
top:0px;
left:0px;
}
</style>
<canvas id="Canvas"></canvas>
<style>
#nav { width:150px; height: 400px; border: 1px solid #D4CD49; position:fixed;left:0;top:30% }
</style>
<script>
window.requestAnimFrame=
window.requestAnimationFrame||
window.webkitRequestAnimationFrame||
window.mozRequestAnimationFrame||
window.oRequestAnimationFrame||
window.msRequestAnimationFrame||
function(callback){window.setTimeout(callback, 1000/10);};
var W=document.body.scrollWidth,H=document.body.scrollHeight;
var ca=document.getElementById("Canvas"),el=ca.getContext("2d");
var num=0,SpeedBasic=3,SpeedRand=0.8,angleBasic=0.5,timer,lline=20;
var x=new Array(),y=new Array(),speed=new Array(),angle=new Array(),t=new Array(),TT=new Array();
var img1=new Image(),img2=new Image(),img3=new Image(),img4=new Image();
function RandomNum(Min,Max){
var Range=Max-Min;
var Rand=Math.random();
return(Min+Math.round(Rand * Range));
}
function RandomReal(Min,Max){
return Min+(Max-Min)*Math.random();
}
function abs(W){return W<=0?-W:W;}
function drawtail(px,py,an){
an=Math.atan(an);
for (var i=0;i<10;i++){
var X,Y;
Y=Math.sqrt(RandomReal(0,lline*lline));
X=RandomReal(-Y*5/lline,Y*5/lline)+RandomReal(-Y*5/lline,Y*5/lline);
Y=lline-Y;
X+=10;
el.fillRect(px+(X*Math.cos(an)-Y*Math.sin(an)),py-(X*Math.sin(an)+Y*Math.cos(an)),2,2);
}
}
function drawstar(px,py,ti){
if (ti==1) el.drawImage(img1,px,py,20,20);else
if (ti==2) el.drawImage(img2,px,py,20,20);else
if (ti==3) el.drawImage(img3,px,py,20,20);else
if (ti==4) el.drawImage(img4,px,py,20,20);
}
function drawline(sx,sy,px,py){
el.beginPath();
el.moveTo(sx,sy);
el.lineTo(px,py);
el.stroke();
el.closePath();
}
function dis(sx,sy,px,py){
return Math.sqrt((px-sx)*(px-sx)+(py-sy)*(py-sy));
}
function work(timestamp){
if (RandomNum(0,5)==0){
x.push(RandomNum(0,W));
y.push(RandomNum(0,H));
t.push(0);
TT.push(RandomNum(3,10));
speed.push(SpeedBasic+RandomReal(-SpeedRand,SpeedRand)+RandomReal(-SpeedRand,SpeedRand)+RandomReal(-SpeedRand,SpeedRand));
angle.push(RandomReal(-angleBasic,angleBasic)+RandomReal(-angleBasic,angleBasic)+RandomReal(-angleBasic,angleBasic));
for (;;){
if (Math.random()<=0.7) y[num]=0;else{
y[num]%=200;
if (Math.random()<=0.5) x[num]=0,angle[num]=abs(angle[num]);else x[num]=W-1,angle[num]=-abs(angle[num]);
}
var i;
for (i=0;i<num;i++) if (dis(x[i],y[i],x[num],y[num])<20) break;
if (i==num) break;
x[num]=RandomNum(0,W);y[num]=RandomNum(0,H);
}
num++;
}
el.clearRect(0,0,W,H);
el.fillStyle="#7B68EE";
var tmp;
for (var i=0;i<num;i++)
for (var j=i+1;j<num;j++)
if (dis(x[i],y[i],x[j],y[j])<20){
tmp=speed[i];
speed[i]=speed[j];
speed[j]=tmp;
tmp=angle[i];
angle[i]=angle[j];
angle[j]=tmp;
}
for (var i=0;i<num;i++){
//el.fillRect(x[i],y[i],10,10);
drawtail(x[i],y[i],angle[i]);
drawstar(x[i],y[i],(parseInt(t[i]/TT[i])%4)+1);
y[i]+=speed[i];x[i]+=(speed[i]*angle[i]);
t[i]++;
if (y[i]>=H||x[i]<0||x[i]>=W){
num--;
x[i]=x[num];y[i]=y[num];speed[i]=speed[num];angle[i]=angle[num];t[i]=t[num];TT[i]=TT[num];
x.pop();y.pop();speed.pop();angle.pop();t.pop();TT.pop();
i--;
}
}
timer=requestAnimationFrame(work);
}
timer=requestAnimationFrame(work);
var sta=1;
function control(){
if (sta==1){
cancelAnimationFrame(timer);
ca.style.opacity="0";
sta=0;
}else{
timer=requestAnimationFrame(work);
ca.style.opacity="1";
sta=1;
}
}
function ShowTab(){
dx=document.getElementById("MagicArray");
if (dx.style.width=="200px"){
dx.style.width="0px";
dx.style.height="0px";
dx.style.bottom="100px";
dx.style.right="100px";
dx.style.transform="rotate(0deg)";
}else{
dx.style.width="200px";
dx.style.height="200px";
dx.style.bottom="0px";
dx.style.right="0px";
dx.style.transform="rotate(180deg)";
}
dy=document.getElementsByName("Tab");
for (var i=0;i<y.length;i++){
dx=dy[i];
if (dx.style.fontSize=="15px"){
dx.style.fontSize="0px";
dx.style.transitionDelay="0s";
}else{
dx.style.fontSize="15px";
dx.style.transitionDelay="0.8s";
}
}
}
function ShowPicture(){
dx=document.getElementById("main");
if (dx.style.opacity=="0") dx.style.opacity="0.9";else dx.style.opacity="0";
}
function ChangePicture(){
dx=document.body;
dy=RandomNum(0,14);
if (dy==0){
dx.style.background="url(http://images.cnblogs.com/cnblogs_com/Mayfly-nymph/1233628/o_pic2.jpg) no-repeat fixed";
dx.style.backgroundSize="cover";
}else if (dy==1){
dx.style.background="url(https://www.cnblogs.com/images/cnblogs_com/Mayfly-nymph/1233628/o_picture1.jpg) no-repeat fixed";
dx.style.backgroundSize="cover";
}else if (dy==2){
dx.style.background="url(https://www.cnblogs.com/images/cnblogs_com/Mayfly-nymph/1233628/o_ghostblade_by_wlop_d8i94nx-fullview.jpg) no-repeat fixed";
dx.style.backgroundSize="cover";
}else if (dy==3){
dx.style.background="url(https://www.cnblogs.com/images/cnblogs_com/Mayfly-nymph/1233628/o_164404qas98559n01slq07.jpg) no-repeat fixed";
dx.style.backgroundSize="cover";
}else if (dy==4){
dx.style.background="url(https://www.cnblogs.com/images/cnblogs_com/Mayfly-nymph/1233628/o_darvb38-6e015fe5-ca69-4e7f-bfce-9a515a26ba37.jpg) no-repeat fixed";
dx.style.backgroundSize="cover";
}else if (dy==5){
dx.style.background="url(https://www.cnblogs.com/images/cnblogs_com/Mayfly-nymph/1233628/o_dba1c7d-ef42bfde-ec75-42d3-8e77-0534f4bcc528.jpg) no-repeat fixed";
dx.style.backgroundSize="cover";
}else if (dy==6){
dx.style.background="url(https://www.cnblogs.com/images/cnblogs_com/Mayfly-nymph/1233628/o_dbjz9lh-829f3d6d-50d3-404d-bcd9-9099e59076e2.jpg) no-repeat fixed";
dx.style.backgroundSize="cover";
}else if (dy==7){
dx.style.background="url(http://images.cnblogs.com/cnblogs_com/Mayfly-nymph/1233628/o_dc4f3ik-1183f349-fc4f-4b07-a3e3-2b238ddb9adb.jpg) no-repeat fixed";
dx.style.backgroundSize="cover";
}else if (dy==8){
dx.style.background="url(https://www.cnblogs.com/images/cnblogs_com/Mayfly-nymph/1233628/o_dcauzp2-3acd9be8-5ac6-4747-9b72-f95fe1c3c730.jpg) no-repeat fixed";
dx.style.backgroundSize="cover";
}else if (dy==9){
dx.style.background="url(https://www.cnblogs.com/images/cnblogs_com/Mayfly-nymph/1233628/o_fall_by_wlop_dbmfxto-fullview.jpg) no-repeat fixed";
dx.style.backgroundSize="cover";
}else if (dy==10){
dx.style.background="url(https://www.cnblogs.com/images/cnblogs_com/Mayfly-nymph/1233628/o_dccxg4s-28ec7113-ec88-4688-96f0-dd8c28e587f5.jpg) no-repeat fixed";
dx.style.backgroundSize="cover";
}else if (dy==11){
dx.style.background="url(https://www.cnblogs.com/images/cnblogs_com/Mayfly-nymph/1233628/o_WLOP%20%e9%ac%bc%e5%88%80%20%e5%b0%8f%e7%bb%bf%204K%e5%a3%81%e7%ba%b8.jpg) no-repeat fixed";
dx.style.backgroundSize="cover";
}else if (dy==12){
dx.style.background="url(https://www.cnblogs.com/images/cnblogs_com/Mayfly-nymph/1233628/o_wlop%e9%ac%bc%e5%88%80%e9%ab%98%e6%b8%85%e5%a3%81%e7%ba%b81920x1241.jpg) no-repeat fixed";
dx.style.backgroundSize="cover";
}else if (dy==13){
dx.style.background="url(https://www.cnblogs.com/images/cnblogs_com/Mayfly-nymph/1233628/o_%e5%a5%b3%e5%ad%a9%e5%92%8c%e7%8c%ab6k%e5%8a%a8%e6%bc%ab%e5%9b%be%e7%89%87.jpg) no-repeat fixed";
dx.style.backgroundSize="cover";
}else if (dy==14){
dx.style.background="url(http://images.cnblogs.com/cnblogs_com/Mayfly-nymph/1233628/o_627cdf7f0c228c9748674e157a179820.png) no-repeat fixed";
dx.style.backgroundSize="cover";
}
}
ChangePicture();
</script>
</body>
</html>

页首HTML代码

源码下载地址:https://www.lanzous.com/i2a123i

附加(可以自行选择添加):

仓鼠,小狗等插件源码获取地址:http://abowman.com/

博客时钟:http://www.blogclock.cn/index.aspx

我右上角的旋转方块代码

<style type="text/css">
html,body{height: 120%;}
.wrap{height: 50%;position: relative;
-webkit-transform-style:preserve-3d;
-webkit-perspective:0px;
-moz-transform-style:preserve-3d;
-moz-perspective:0px;
-webkit-animation:mydhua 5s ease infinite;
-moz-animation:mydhua 5s ease infinite;
}
.box{width: 150px;height: 150px;position: absolute;top: 50%;left: 50%;
margin:-100px 0 0 -100px; line-height: 200px;text-align: center;font-size: 48px;color: white;
}
.box1{-webkit-transform:rotatey(90deg) translatez(-75px);
-moz-transform:rotatey(90deg) translatez(-75px);
background: rgba(139, 139, 205, 0.5);
}
.box2{-webkit-transform:rotatey(90deg) translatez(75px);
-moz-transform:rotatey(90deg) translatez(75px);
background: rgba(178, 170, 113, 0.59);
}
.box3{-webkit-transform:rotatex(90deg) translatez(75px);
-moz-transform:rotatex(90deg) translatez(75px);
background: rgba(190, 136, 136, 0.5);
}
.box4{-webkit-transform:rotatex(90deg) translatez(-75px);
-moz-transform:rotatex(90deg) translatez(-75px);
background: rgba(0,204,255,.5);
}
.box5{-webkit-transform: translatez(-75px);
-moz-transform:translatez(-75px);
background: rgba(153,204,255,.5);
}
.box6{-webkit-transform: translatez(75px);
-moz-transform:translatez(75px);
background: rgba(0,255,255,.5);
}
@-webkit-keyframes mydhua{0%{-webkit-transform:rotateX(0deg) rotateY(0deg) rotateZ(0deg);-webkit-transform-origin: center center;}
100%{-webkit-transform:rotateX(180deg) rotateY(180deg) rotateZ(180deg);-webkit-transform-origin: center center; }
}
@-moz-keyframes mydhua{0%{-moz-transform:rotateX(0deg) rotateY(0deg) rotateZ(0deg);-webkit-transform-origin: center center;}
100%{-moz-transform:rotateX(180deg) rotateY(180deg) rotateZ(180deg); -webkit-transform-origin: center center;}
}
img {border-radius: 10px;
}
</style>

页面定制CSS代码

<div class="wrap">
<div class="box1 box">
<img src="https://www.cnblogs.com/images/cnblogs_com/Mayfly-nymph/1233628/o_644%20(14).png"></img>
</div>
<div class="box2 box">
<img src="https://www.cnblogs.com/images/cnblogs_com/Mayfly-nymph/1233628/o_644%20(10).png"></img>
</div>
<div class="box3 box">
<img src="https://www.cnblogs.com/images/cnblogs_com/Mayfly-nymph/1233628/o_644%20(8).png"></img>
</div>
<div class="box4 box">
<img src="https://www.cnblogs.com/images/cnblogs_com/Mayfly-nymph/1233628/o_644%20(6).png"></img>
</div>
<div class="box5 box">
<img src="https://www.cnblogs.com/images/cnblogs_com/Mayfly-nymph/1233628/o_644%20(40).png"></img>
</div>
<div class="box6 box">
<img src="https://www.cnblogs.com/images/cnblogs_com/Mayfly-nymph/1233628/o_644%20(10).png"></img>
</div>
</div>

博客侧边栏公告

这里面的图片可以自己选择,但是要注意大小哦,如果做博客园博客的美化可以直接把图片放相册,如果是私人博客美化,可以选择床图。

设置侧边栏与主题的位置

(加到页面定制CSS代码)

#mainContent {
min-height: 200px;
padding: 0px 0px 10px 0;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
overflow: hidden;
float: right;
margin-left: -22em;
width: 100%;
}
#sideBar {
margin-top: -15px;
width: 230px;
min-height: 200px;
padding: 0px 0 0px 5px;
float: left;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
overflow: hidden;
}

设置版权信息

加到“页首html

<script language="javascript" type="text/javascript">
jQuery(document).on('copy', function(e)
{
var selected = window.getSelection();
var copyFooter = '<br>---------------------<br>著作权归作者所有。<br>'
+ '商业转载请联系作者获得授权,非商业转载请注明出处。<br>'
+ '作者:Hk_Mayfly<br> 源地址:' + document.location.href
+ '<br>来源:博客园cnblogs<br>© 版权声明:本文为博主原创文章,转载请附上博文链接!';
var copyHolder = $('<div>', {html: selected + copyFooter, style: {position: 'absolute', left: '-99999px'}});
$('body').append(copyHolder);
selected.selectAllChildren( copyHolder[0] );
window.setTimeout(function() {
copyHolder.remove();
},0);
});
</script>

图片放大

添加进 页面CSS

.post img {
cursor: pointer;
transition: all 0.5s;
}
.post img:hover {
transform: scale(1.3);
}

博客美化总结(持续更新)相关推荐

  1. 个人所有博客分类总结(持续更新)

    个人所有博客分类总结如下(持续更新) Java: 1. 获取Class对象的三种方式 2. 创建对象的四种方式 3. java中的异常种类和区别以及处理机制和区别 4. IO流以及他们的种类区别 序列 ...

  2. 见证我的CSDN博客排名(持续更新)

    本文主要以截图排名的方式记录我的CSDN博客排名,不为排名,只为给予自己持续写文章的动力和记录自己活到老学到老的点点滴滴. 我会不定期更新这篇文章,保持持续更新,持之以恒!

  3. 《.NET应用架构设计:原则、模式与实践》新书博客--试读-持续更新

    新书目录: 前言 第一部分 架构与设计的原则和模式    第1章 架构与设计的流程和核心概念/2               1.1 正确认识软件架构/2                      1 ...

  4. 个人的博客搭建(持续更新)

    最近的CSDN的博客阅读体验非常的糟糕,恰好自己也一直想搭建一个属于自己的网站,放下自己的技术心得情感体会,从零开始慢慢搭建项目磨练技术,以后也把自己新习得的技术放在里面增加自己的学习乐趣. 一,搭建 ...

  5. 优秀博客学习资源(持续更新)

    互联网时代,知识种类繁多且复杂,有好的也有坏的.而跟着大牛学则可以在一定程度上减轻知识学习的负担. 把个人时间和精力集中在高品质内容的学习和研究上. 互联网时代跟着牛人来学知识能少走一些弯路,比自己学 ...

  6. Hexo 博客优化之博客美化系列(持续更新)

    2022-01-25 更新:博客新地址:https://www.itbob.cn/,文章距上次编辑时间较远,部分内容可能已经过时! 本文将讲述一些 Hexo 博客的美化,本文以作者 luuman 的 ...

  7. 【博客美化】评论带头像,且支持旋转

    [博客美化]评论带头像,且支持旋转 好久没有更新关于博客园页面美化的文章了,这一次主要是写一下关于评论带头像,且支持旋转的内容,希望各位小伙伴能够喜欢!!! 1.效果图 2.添加CSS代码 设置-页面 ...

  8. 【博客美化】08.添加扩大/缩小浏览区域大小 按钮

    博客园美化相关文章目录: [博客美化]01.推荐和反对炫酷样式 [博客美化]02.公告栏显示个性化时间 [博客美化]03.分享按钮 [博客美化]04.自定义地址栏logo [博客美化]05.添加Git ...

  9. 前端小白也能快速学会的博客园博客美化全攻略

    前端小白也能快速学会的博客园博客美化全攻略 A呦V,博客园er的自我修养是什么?第一条,别只顾收藏和偷师呀,记得点"推荐"或关注本人喔~ 美化方法论简介 一般而言,需要选一个默认的 ...

最新文章

  1. java 重载与覆盖_Java重载与覆盖
  2. 趣谈网络协议笔记-二(第十九讲)
  3. r语言x%3c-读取文件,R语言读写最灵活的文件——txt文件
  4. 按键抖动仿真Testbench(repeat、task、random)的用法
  5. 一篇RxJava友好的文章(一)
  6. 4 C++对C的加强之namespace命名空间
  7. ORA-16019: cannot use LOG_ARCHIVE_DEST_1 解决方法
  8. python中eps参数_2019-01-23 python PIL 编辑 EPS 文件调整大小并拼接-失败告终
  9. oracle 10g real application clusters introduction (RAC原理)
  10. 【今日CS 视觉论文速览】Part2, 16 Jan 2019
  11. MATLAB学习笔记(十八)
  12. linux 驱动 (2)---Linux input子系统最清晰、详尽的分析
  13. ACL'22 | 关系抽取和NER等论文分类整理
  14. 虚拟机连不上网 Xshell连不上虚拟机
  15. 【君思智慧园区】智慧园区建设规划方案
  16. 编程游戏开发【飞翔的小鸟】
  17. ESL3.6 几种线性回归方法比较学习笔记(含协方差相关系数概念)
  18. html5绘制变换图形-旋转图形
  19. 多方隐私求交——基于OPPRF的MULTI-PARTY PSI
  20. 【期末复习之路】JAVA(二)A

热门文章

  1. Zerg虫族的传说[官方资料]
  2. 文学类的小说,言情类的,没有排行榜上的
  3. 计算机通识之TCP/IP协议簇(二)
  4. pycharm运行python程序没有解释器怎么办
  5. SpringBoot(四)整合视图
  6. sklearn笔记29 线性回归 天猫双十一销量预测
  7. Google Indexing API 推送 (避免踩坑)
  8. nginx反向代理指定dns
  9. 【Ubuntu 20.04 LTS】安装虚拟机VMware 16
  10. web service 优缺点