博客界面美化
效果
前期准备设置
博客侧边栏代码
1 | <script src= "https://files.cnblogs.com/files/quaint/sakuraPlus.js" ></script> |
页面定制CSS代码
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | #home { margin: 0 auto; width: 80%; /*原始65*/ min-width: 980px; /*页面顶部的宽度*/ background-color: rgba(245, 245, 245, 0.7); padding: 30px; margin-top: 50px; margin-bottom: 50px; box-shadow: 0 2px 6px rgba(100, 100, 100, 0.3); } body { background: rgba(12, 100, 129, 1) url( 'https://img-baofun.zhhainiao.com/fs/71c5aae74c6698df71fe37aed16084a5.jpg' ) fixed no-repeat; //修改背景图片 background-position: 50% 1%; background-size: cover; } #blogTitle { height: 100px; /*高度*/ clear: both; background-color: rgba(240,255,255,0.5); //博客标题的背景 } #blogTitle h1 { font-size: 36px; font-weight: bold; line-height: 1.8em; /*原始 1.6em*/ margin-top: 10px; /*原始 15px */ color: #FF1493; } #blogTitle h2 { font-weight: normal; font-size: 17px; /*原始 16px ;font-size: 1.0rem;*/ line-height: 1.8; color: #FF1493; font-weight: bold; text-align: right; float : right; } #navigator{ background-color:rgba(135,206,205, 0.5); //标题栏下的颜色 } #navList a:link, #navList a:visited, #navList a:active{ color: #FFFFFF; font-size: 18px; font-weight: bold; } .blogStats{ color: #eee; } .postTitle { border-left: 8px solid rgba(132,112,255, 0); margin-left: 10px; margin-bottom: 10px; font-size: 20px; float : right; width: 100%; clear: both; } .postTitle a:link, .postTitle a:visited, .postTitle a:active { color: #FF6A6A; transition: all 0.4s linear 0s; } .postTitle a:hover { margin-left: 30px; color: #EE6363; text-decoration: none; } .postCon { float : right; line-height: 1.5em; width: 100%; clear: both; padding: 10px 0; } .day .postTitle a { padding-left: 10px; } .day { background: rgba(255, 255, 255, 0.5); } /*文章附加信息*/ .postDesc { background: url(images/posted_time.png) no-repeat 0 1px; color: #757575; float : left; width: 100%; clear: both; text-align: left; font-family: "微软雅黑" , "宋体" , "黑体" ,Arial; font-size: 13px; padding-right: 20px; /*5px padding-left: 90px;posted 发表时间左边距离*/ margin-top: 20px; line-height: 1.8; padding-bottom: 35px; } .newsItem, .catListEssay, .catListLink, .catListNoteBook, .catListTag, .catListPostCategory, .catListPostArchive, .catListImageCategory, .catListArticleArchive, .catListView, .catListFeedback, .mySearch, .catListComment, .catListBlogRank, .catList, .catListArticleCategory ,#blog-calendar { background: rgba(255, 255, 255, 0.5); margin-bottom: 35px; word-wrap: break -word; } .CalTitle{ background: rgba(255, 255, 255, 0); } .catListTitle{ background-color: rgba(255,110,180,0.6); //栏目的条纹颜色 } #topics{ background: rgba(255, 255, 255, 0.5); } .c_ad_block{ display: none; } #tbCommentBody{ width: 100%; height: 200px; background: rgba(255, 255, 255, 0.5); } #q{background: rgba(255, 255, 255, 0);} .CalNextPrev{background: rgba(255, 255, 255, 0);} .cnblogs_code{ background: rgba(255, 255, 255, 0); } .cnblogs_code div{ background: rgba(255, 255, 255, 0); } .cnblogs_code_toolbar{ background: rgba(255, 255, 255, 0); } #main{min-width: 640px;} .entrylist{ background: rgba(255, 255, 255, 0.5); } //雪花特效 #Snow{ position: fixed ; top: 0; left: 0; width: 100%; height: 100%; z-index: 99999; background: rgba(125,137,95,0.1); pointer-events: none; } |
首页HTML代码
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | <!DOCTYPE html> <html xmlns= "http://www.w3.org/1999/xhtml" > <body> <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://blog-static.cnblogs.com/files/themysteryofhackers/live2d.js" ></script> <script src= "https://blog-static.cnblogs.com/files/themysteryofhackers/waifu-tips.js" ></script> <script type= "text/javascript" >initModel()</script> <div class = "Snow" > <canvas id= "Snow" ></canvas> </div> <div class = "Snow" > <canvas id= "Snow" ></canvas> </div> <script src= "https://blog-static.cnblogs.com/files/Return-blog/xue.js" ></script> </body> </html> |
页脚HTML代码
1 2 3 4 5 6 7 8 9 10 11 | <!DOCTYPE html> <html lang= "en" > <head> <meta charset= "UTF-8" > <title>Title</title> </head> <body> <script src= "https://blog-static.cnblogs.com/files/zouwangblog/mouse-click.js" ></script> <canvas width= "1777" height= "841" style= "position: fixed; left: 0px; top: 0px; z-index: 2147483647; pointer-events: none;" ></canvas> </body> </html> |
__EOF__

本文作者:有点丿东西
本文链接:https://www.cnblogs.com/Jeffrey1172417122/p/17051892.html
关于博主:评论和私信会在第一时间回复。或者直接私信我。
版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
声援博主:如果您觉得文章对您有帮助,可以点击文章右下角【推荐】一下。您的鼓励是博主的最大动力!
本文链接:https://www.cnblogs.com/Jeffrey1172417122/p/17051892.html
关于博主:评论和私信会在第一时间回复。或者直接私信我。
版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
声援博主:如果您觉得文章对您有帮助,可以点击文章右下角【推荐】一下。您的鼓励是博主的最大动力!
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 【.NET】调用本地 Deepseek 模型
· CSnakes vs Python.NET:高效嵌入与灵活互通的跨语言方案对比
· 我与微信审核的“相爱相杀”看个人小程序副业
· DeepSeek “源神”启动!「GitHub 热点速览」
· Plotly.NET 一个为 .NET 打造的强大开源交互式图表库