历时半个月,找了一堆大佬的指教,结合自己的想法。
最后生成了这个主题。
(是不是背景的小姐姐和雪花特别特别的配?!)
好啦好啦,直接上代码了。
首先。我们在$blog$设置里面,在页面定制$CSS$代码下面的禁用模板默认$CSS$勾上。
之后确保你支持$js$代码。
然后就可以修改啦~
代码里有详解哦~
upd: 这些东西已经分好类。如果不想要一些东西,可以直接删掉。
有一些要是不喜欢的话,可以直接修改(部分代码有改动提示)
1.页面定制css代码
@font-face { font-family: 'FontAwesome'; font-style: normal; font-weight: normal; src: url("http://blog.zhaishidan.cn/css/font/fontawesome-webfont.eot?#iefix") format('embedded-opentype'), url("http://blog.zhaishidan.cn/css/font/fontawesome-webfont.woff") format('woff'), url("http://blog.zhaishidan.cn/css/font/fontawesome-webfont.ttf") format('truetype'), url("http://blog.zhaishidan.cn/css/font/fontawesome-webfont.svg#FontAwesomeRegular") format('svg'); } * { margin: 0; padding: 0; } /*背景*/ body { background: url(https://s1.ax1x.com/2018/06/15/Cj4PAO.png); /*url后面的括号里填想要做背景的图片*/ color: #800000; font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; font-size: 14px; text-shadow: 0 0 1px transparent; color:#505050; /*首页显示博文的一部分内容的字体*/ } /*背景结束*/ @media screen and (max-width: 1260px) { body { margin: 0px; } } /*超链接的东东 */ @media screen and (max-width: 600px) { body { font-size: 13px; } } h1,h2,h3,h4,h5,h6 {font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif;} h1 {font-size: 1.8em;} h2 {font-size: 1.5em;} h3 {font-size: 1.3em;} a {text-decoration:none;color:#da7047;} /*上面的是超链接的字体颜色。*/ a:hover {text-decoration: underline;} /*……*/ /*次级背景*/ #home{ margin: 0 auto; width: 85%; background-color: #fff; padding: 30px; background: filter:alpha(opacity:30); opacity:0.9; -moz-opacity:0.9; -khtml-opacity: 0.9; margin-top: 50px; margin-bottom: 50px; box-shadow: 0 2px 6px rgba(100, 100, 100, 0.3); border-radius: 20px; font-family:Lucida Handwriting,Helvetica,sans-serif; } /*次级背景结束*/ #tbCommentBody {width: 100%;} /*博客标题大小*/ #blogTitle {width:100%;margin-top: -10px;text-align: center;} .alignright {float: righ;} .clearfix {zoom: 1;} .clearfix:before,.clearfix:after {content: "";display: table;} .clearfix:after {clear: both;} #header, #main, #footer {width: 100%;margin: 0 auto;} @media screen and (max-width: 1260px) { #main { width: 95%; } } /*首页显示部分博文大小居中等*/ #mainContent { width: 75%; float: left; margin-left: 10px; } @media screen and (max-width: 1260px) { #main-col { width: 100%; margin-right: -300px; } } @media screen and (max-width: 900px) { #main-col { margin-right: 0; float: none; } } @media screen and (max-width: 1260px) { #wrapper { margin-right: 300px; } } @media screen and (max-width: 900px) { #wrapper { margin-right: 0; } } /*签名*/ #header { text-shadow: 0 0 1px #fff; margin: 20px auto 30px; position: relative; height: 60px; color: #999; } #header a { color: #999; } /*鼠标移动后字体颜色*/ #header a:hover { color: #000; text-decoration: none; } #header h1 { font-weight: normal; font-size: 30px; } #header h2 { font-weight: normal; font-size: 0.9em; margin-top: 10px; margin-left: 30px; } /*结束*/ /*分割线*/ #header #navigator { font-family: "Lato", Helvetica Neue, Helvetica, Arial, sans-serif; width: 100%; font-size: 16px; border-bottom: 1px solid #ededed; border-top: 1px solid #ededed; height: 50px; line-height: 50px; clear: both; margin-top: 25px; } #header #navigator ul { list-style: none; } #header #navigator ul li { float: left; width: 10%; text-align: center; margin-right: 15px; } /*分割线结束*/ /*随笔.文章.评论数*/ #header .blogStats { float: right; font-size: 13px; } /*换页*/ .topicListFooter { margin-top:30px; margin-bottom: 30px; margin-right: 0 !important; } .topicListFooter a { display: inline !important; padding: 10px 20px; color: #da7047; font-family: "Lato", Helvetica Neue, Helvetica, Arial, sans-serif; text-shadow: 0 0 1px #fff; border-radius: 5px; } .topicListFooter a:hover { background: #da74; color: #da7047; text-decoration: none; text-shadow: none; } .topicListFooter .prev:before { content: '\f053'; padding-right: 10px; font-family: FontAwesome; } .topicListFooter .next:after { content: '\f054'; padding-left: 10px; font-family: FontAwesome; } /*首页文章内容*/ article { -webkit-box-shadow: 1px 2px 3px #222; box-shadow: 1px 2px 3px #222; /*上面两个都是字体颜色*/ background: #fff; /*这个是背景颜色,最好别改*/ } article.page { padding-left: 20px; } article.page .icon { display: none; } .postIcon:before { content: '\f016'; } article.photo .icon:before { content: '\f030'; } article.link .icon:before { content: '\f0c1'; } article.link .title a:after { content: '\f08e'; color: #999; font: 12px FontAwesome; padding-left: 10px; vertical-align: super; } /******************************************以下自定义样式***********************************************/ #MySignature{ border-top: 2px solid #ccc; padding-top: 20px; } .pager a{ margin:0 2px; padding:10px 20px; font-size:20px 30px; } /*页码与文章的虚线*/ .pager{ /* border-bottom: 1px dashed #da7047;*/ padding-bottom: 30px; margin-bottom: -30px; color:#da7047; } #blog-calendar{ width:0px; height:0px; display: none !important; } #TopViewPostsBlock ul li{ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; display: inline-block; height: 30px; line-height: 30px; } .day .dayTitle{ display: none !important; } /*去掉广告*/ #ad_t2,#opt_under_post,.c_ad_block,#under_post_news,#under_post_kb{ display: none !important; } .postTitle, .entrylistPosttitle { font-family: "Lato", Helvetica Neue, Helvetica, Arial, sans-serif; font-size: 1.8em; padding: 20px 20px 15px 0px; background: #fff; border-radius: 10px 10px 0px 0px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .entrylistPostSummary, .postCon, .postBody { padding: 0 20px 15px 0px; -webkit-box-shadow: 1px 2px 3px #ddd; box-shadow: 0 2px 0 #ddd; background: #fff; position: relative; } .postDesc, .entrylistItemPostDesc { padding: 0px 20px 15px 0px; color: #999; font-size: 0.9em; line-height: 16px; position: relative; min-height: 16px; background: #fff; border-bottom: 1px dashed #ccc; } #blog-calendar { display: none; } @media screen and (max-width: 600px) { .postCon { padding-left: 0px; } } .postIcon { height: 0px; margin-right: 25px; position: relative; top: 25px; left: 25px; color: #258fb8; } @media screen and (max-width: 600px) { article header .icon { display: none; } } .postIcon:before { position: absolute; font: 32px FontAwesome; top: 0; left: 0; width: 32px; text-align: center; } article header time { color: #999; font: 0.9em "Lato", Helvetica Neue, Helvetica, Arial, sans-serif; margin-bottom: 5px; display: block; line-height: 1; } article header .title { font-weight: normal; } article header .title a { color: #444; } article header .title a:hover { color: #258fb8; text-decoration: none; } #cnblogs_post_body { text-align: justify; line-height: 1.6; } #cnblogs_post_body p, #cnblogs_post_body blockquote, #cnblogs_post_body ul, #cnblogs_post_body ol, #cnblogs_post_body dl, #cnblogs_post_body table, #cnblogs_post_body iframe, #cnblogs_post_body h3, #cnblogs_post_body h4, #cnblogs_post_body h5, #cnblogs_post_body h6, #cnblogs_post_body .video-container { margin-top: 15px; } #cnblogs_post_body blockquote { border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; font-style: italic; font-family: "Georgia", serif; font-size: 1.2em; padding: 0 30px 15px; } #cnblogs_post_body blockquote footer { border-top: none; font-size: 0.8em; line-height: 1; margin: 20px 0 0; padding-top: 0; } #cnblogs_post_body blockquote footer cite:before { content: '—'; color: #ccc; padding: 0 0.5em; } #cnblogs_post_body code, #cnblogs_post_body pre { font-family: Monaco, Menlo, Consolas, Courier New, monospace; } #cnblogs_post_body code { background: #eee; color: #666; padding: 0 5px; margin: 0 2px; font-size: 0.9em; border: 1px solid #ddd; -webkit-border-radius: 3px; border-radius: 3px; } #cnblogs_post_body pre { background: #eee; overflow: auto; padding: 7px 15px; -webkit-border-radius: 2px; border-radius: 2px; } #cnblogs_post_body pre code { background: none; padding: 0; margin: 0; border: none; -webkit-border-radius: 0; border-radius: 0; } #cnblogs_post_body ul ul, #cnblogs_post_body ol ul, #cnblogs_post_body dl ul, #cnblogs_post_body ul ol, #cnblogs_post_body ol ol, #cnblogs_post_body dl ol, #cnblogs_post_body ul dl, #cnblogs_post_body ol dl, #cnblogs_post_body dl dl { margin-top: 0; } #cnblogs_post_body h1, #cnblogs_post_body h2 { font-weight: bold; border-bottom: 1px solid #ddd; padding-bottom: 10px; margin-top: 20px; } #cnblogs_post_body h3, #cnblogs_post_body h4, #cnblogs_post_body h5, #cnblogs_post_body h6 { font-weight: normal; background: #eee; border-radius: 6px; color: Red; font-family: "微软雅黑" , "宋体" , "黑体" ,Arial; height: 25px; line-height: 25px; margin: 18px 5px !important; padding: 8px; opacity: 0.8; border: 1px dashed #aaa; } .postBody img, .entrylistPostSummary img, .postCon img, .postBody video { max-width: 100%; height: auto; border: none; } #cnblogs_post_body iframe { border: none; } #cnblogs_post_body .caption { display: block; margin-top: 5px; color: #999; position: relative; font-size: 0.9em; padding-left: 25px; } #cnblogs_post_body .caption:before { content: '\f040'; position: absolute; font: 1.3em FontAwesome; position: absolute; left: 0; top: 3px; } #cnblogs_post_body .video-container { position: relative; padding-bottom: 56.25%; padding-top: 30px; height: 0; overflow: hidden; } #cnblogs_post_body .video-container iframe, #cnblogs_post_body .video-container object, #cnblogs_post_body .video-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; margin-top: 0; } #cnblogs_post_body .pullquote { float: right; border: none; padding: 0; margin: 1em 0 0.5em 1.5em; text-align: left; width: 45%; font-size: 1.5em; } #blog-comments-placeholder, #comment_form { padding: 20px; background: #fff; -webkit-box-shadow: 1px 10px 10px #ddd; box-shadow: 10px 10px 10px #ddd; margin-bottom: 50px; border: 1px solid #ccc; padding-top:0; } .feedback_area_title { margin-bottom: 15px; font-size: 1.8em; } .feedbackItem { border-bottom: 1px dashed #CCC; margin-bottom: 10px; padding: 5px; } .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; } #ad_under_post_holder { display: none; } .entrylistTitle { color: #999; font-weight: normal; margin-bottom: 30px; text-shadow: 0 0 1px #fff; } .entrylistTitle:before { font-family: FontAwesome; content: '\f07b'; padding-right: 15px; } .archive { -webkit-box-shadow: 1px 2px 3px #ddd; box-shadow: 1px 2px 3px #ddd; border-bottom: 1px solid #ddd; margin-bottom: 50px; } .archive article { -webkit-box-shadow: none; box-shadow: none; } .archive article .post-content { margin-bottom: 0; } /*侧边栏*/ #sideBar{ width: 22%; line-height: 1.8em; float: right; } @media screen and (max-width: 900px) { #sideBar { float: none; width: 100%; } } .catListLink, .catListMyTeams, .catListComment,.catListFeedback{ display: none; } .search, .newsItem, .catListPostCategory, .catListPostArchive, .catListTag, .catListView, .catListBlogRank { background: #fff; -webkit-box-shadow: 1px 2px 3px #ddd; box-shadow: 10px 10px 10px #ddd; margin-bottom: 30px; word-wrap: break-word; border-radius: 10px; margin-top: 10px; border: 1px solid #ddd; } #blog-sidecolumn h3, .newsItem h3 { padding: 15px 20px; font-size: 1em; border-bottom: 1px solid #ddd; font-weight: normal; } #blog-sidecolumn ul, .newsItem #blog-news { font-size: 0.9em; padding: 15px 20px; } #blog-sidecolumn ul, #blog-sidecolumn ol, #blog-sidecolumn dl { list-style: none; } #blog-sidecolumn ul ul, #blog-sidecolumn ol ul, #blog-sidecolumn dl ul, #blog-sidecolumn ul ol, #blog-sidecolumn ol ol, #blog-sidecolumn dl ol, #blog-sidecolumn ul dl, #blog-sidecolumn ol dl, #blog-sidecolumn dl dl { list-style: disc; margin-left: 20px; } #q { background: #fff; font-family: "Lato", Helvetica Neue, Helvetica, Arial, sans-serif; font-style: italic; font-size: 1em; padding: 10px 15px; border: 1px solid #ddd; width: 100%; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; color: #999; height: 100%; } #q:focus { color: #444; } /*隐藏搜索框中的无用组件*/ .mySearch { display: none; } /*底边小字*/ #sideBar .tag small { margin-left: 15px; color: #999; } #sideBar .tag small:before { content: '('; } #sideBar .tag small:after { content: ')'; } #sideBar .twitter li { border-bottom: 1px solid #ddd; padding: 15px 20px; font-size: 0.9em; } #sideBar .twitter li:last-of-type { border-bottom: none; } #sideBar .twitter small { display: block; margin-top: 10px; color: #999; line-height: 1; } #sideBar .tagcloud .entry { padding-right: 5px; } #sideBar .tagcloud a { margin-right: 10px; display: inline-block; } #footer { color: #999; margin-bottom: 50px; font: 0.9em/1.6 "Lato", Helvetica Neue, Helvetica, Arial, sans-serif; text-shadow: 0 0 1px #fff; text-align:center; margin: 30px 0px 50px; } .entry .gist { background: #eee; border: 1px solid #ddd; margin-top: 15px; padding: 7px 15px; -webkit-border-radius: 2px; border-radius: 2px; text-shadow: 0 0 1px #fff; line-height: 1.6; overflow: auto; color: #666; } .entry .gist .gist-file { border: none; font-family: inherit; margin: 0; font-size: 0.9em; } .entry .gist .gist-file .gist-data { background: none; border-bottom: none; } .entry .gist .gist-file .gist-data pre { padding: 0 !important; font-family: Lucida Handwriting,Monaco, Menlo, Consolas, Courier New, monospace; } .entry .gist .gist-file .gist-meta { background: none; color: #999; margin-top: 5px; padding: 0; text-shadow: 0 0 1px #fff; font-size: 100%; } .entry .gist .gist-file .gist-meta a { color: #258fb8; } .entry .gist .gist-file .gist-meta a:visited { color: #258fb8; } /*代码高亮*/ figure.highlight { background: #eee; border: 1px solid #ddd; margin-top: 15px; padding: 7px 15px; -webkit-border-radius: 2px; border-radius: 2px; text-shadow: 0 0 1px #fff; line-height: 1.6; overflow: auto; position: relative; font-size: 0.9em; } figure.highlight figcaption { color: #999; margin-bottom: 5px; text-shadow: 0 0 1px #fff; } figure.highlight figcaption a { position: absolute; right: 15px; } figure.highlight pre { border: none; padding: 0; margin: 0; } figure.highlight table { margin-top: 0; border-spacing: 0; } figure.highlight .gutter { color: #999; padding: 7px 10px 7px 5px !important; border-right: 1px solid #ddd; text-align: right; } figure.highlight .code { padding: 7px 7px 7px 10px !important; border-left: 1px solid #fff; color: #666; } /*下面是各种代码的颜色*/ pre .comment, pre .template_comment, pre .diff .header, pre .doctype, pre .pi, pre .lisp .string, pre .javadoc { color: #93a1a1; font-style: italic; } pre .keyword, pre .winutils, pre .method, pre .addition, pre .css .tag, pre .request, pre .status, pre .nginx .title { color: #859900; } pre .number, pre .command, pre .string, pre .tag .value, pre .phpdoc, pre .tex .formula, pre .regexp, pre .hexcolor { color: #2aa198; } pre .title, pre .localvars, pre .chunk, pre .decorator, pre .built_in, pre .identifier, pre .vhdl, pre .literal, pre .id { color: #268bd2; } pre .attribute, pre .variable, pre .lisp .body, pre .smalltalk .number, pre .constant, pre .class .title, pre .parent, pre .haskell .type { color: #b58900; } pre .preprocessor, pre .preprocessor .keyword, pre .shebang, pre .symbol, pre .symbol .string, pre .diff .change, pre .special, pre .attr_selector, pre .important, pre .subst, pre .cdata, pre .clojure .title { color: #cb4b16; } pre .deletion { color: #dc322f; } .feedbackListSubtitle { position: relative;} .feedbackManage {width: 160px;position: absolute;right: 0;text-align: right;} .cnblogs_code_toolbar {display: none;} #cnblogs_post_body {overflow: hidden;} #cnblogs_post_body ol { padding-left: 40px;} #cnblogs_post_body ul { margin-left: 35px;} .fixedReadRank { position: fixed; top: 20px; width: 270px; } .fixedRecRank { position: fixed; top: 360px; width: 270px; } figure.highlight { margin-top: 0; padding: 0;} figure table {width: 100%; margin: 0 !important;} #cnblogs_post_body pre { padding: 0; } #cnblogs_post_body th, #cnblogs_post_body td { padding: 0; } .cnblogs_code pre { padding: 7px 15px !important; background: #f5f5f5;border: 0;margin-top: 0;} .cnblogs_code th {border: 1px solid silver; padding: 3px;} .cnblogs_code { padding: 0;} /*评论标题*/ .feedback_area_title { padding:10px; font-size:24px; font-weight:bold; color:#aaa; border-bottom:1px dashed #ccc; } .feedbackListSubtitle { font-size:12px; color:#888; } .feedbackListSubtitle a { color:#888; } .comment_quote { background:#eee; padding:15px; border:1px dashed #aaa; border-radius:5px; }#commentform_title { color:#aaa; background-image:none; background-repeat:no-repeat; margin-bottom:10px; padding:10px 20px 10px 10px; font-size:24px; font-weight:bold; border-bottom:1px dashed #ccc; } /*评论框*/ #comment_form { margin:10px 0; padding:25px; border-radius: 10px; height: 343px; overflow: hidden; } .commentform { margin:10px 0; padding:10px 20px; background:#fff; } /*评论输入域*/ #tbCommentBody { font-family:'MIcrosoft Yahei'; margin-top:10px; background:white; color:#333; border:2px solid #fff; box-shadow:inset 0 0 8px #aaa; height:120px; font-size:20px; min-height:120px; border-radius: 10px; } /*评论条目*/ .feedbackItem { font-size:14px; line-height:24px; margin:10px 0; padding:20px; } .feedbackListSubtitle { font-weight:normal; } /*green_channel*/ /*分享*/ #green_channel { text:align:right; padding-left:0px; font-weight:normal; font-size:13px; width:100%; border:1px dashed #ccc; color:#fff; border-radius:4px; margin:5px auto; } @media screen and (max-width: 768px) { body { font-size: 13px; } #main{padding:0px !important;} #mainContent{width: 96%;float: left;margin: 0px 2%;} #sideBar {display: none;} #blogTitle {width: 100%;float:none;margin: 20px auto 0 !important;} #header{height:auto !important;margin: 20px auto 5px;} #header #navigator{width: 100%;text-align: center;float:none;} #header #navigator ul{width: 100%;margin-left: 6%;} #header #navigator ul li {float: left;width: 25%;text-align: center;margin-right:0px;} .postTitle, .entrylistPosttitle{font-size:14px;padding: 20px 20px 15px 0px;} .postDesc, .entrylistItemPostDesc{padding: 0px 20px 15px 0px;} #green_channel{padding:0px !important;} #blog_stats{display: none;} } #blog-news label{box-shadow:5px 5px 5px #cccccc;text-shadow:5px 5px 5px #cccccc;border-radius:5px;} #div_digg{ padding: 5px; border-radius: 5px; position: fixed; left: 0; bottom: 80px; width:80px; z-index:100; } /*侧边赞*/ .diggit{ background: url(http://images2017.cnblogs.com/blog/894443/201709/894443-20170920105433618-867225449.png) no-repeat; width: 60px; height: 60px; } #div_digg .diggnum{ position: absolute; bottom: -20px; left: 6px; background: #D0D0D0; padding: 2px 0; display: block; color: #555; font-size: 12px; text-align: center; width: 60px; -moz-border-radius: 4px; -webkit-border-radius: 4px; font-weight: bold; } .buryit{ display: none; } div.commentform textarea.comment_textarea{ padding:10px; } #tbCommentBody{ 98%; } /*评论带头像,且支持旋转*/ .feedbackCon img:hover { -webkit-transform: rotateZ(360deg); -moz-transform: rotateZ(360deg); -ms-transform: rotateZ(360deg); -o-transform: rotateZ(360deg); transform: rotateZ(360deg); } .feedbackCon img { border-radius: 40px; -webkit-transition: all 0.6s ease-out; -moz-transition: all 0.5s ease-out; -ms-transition: all 0.5s ease-out; -o-transition: all 0.5s ease-out; transition: all 0.5s ease-out; } /*CNZZ样式*/ #cnzz_stat_icon_1264405927{ display: block; margin: 10px auto; width: 200px; text-align: center; } /* 评论开始 */ /* 用户头像 */ .blog_comment_body > img.user-avatar { position: absolute; left: -72px; top: 0px; width: 48px; height: 48px; } .myself .blog_comment_body > img.user-avatar { left: initial; right: -72px; } #blog-comments-placeholder { border: solid 1px #CCC; border-radius: 5px; } div#comments_pager_top { display: none; } #blog-comments-placeholder > br { display: none; } /* 评论列表 */ .feedbackManage { width: 130px; display: none; position: absolute; right: 150px; top: 6px; } .feedbackItem:hover .feedbackManage { display: block; } /* 所有评论里面的A标签 */ .feedbackItem a { color: #989898 !important; transition: all .2s; } .feedbackItem a:hover { color: #FF661C !important; text-decoration: underline; } /* 评论分割线 */ .feedbackCon { background: none; clear: both; margin: 10px 0 0 30px; } /* 楼层 */ .feedbackListSubtitle a.layer { background: #B2E866; color: #414141 !important; padding: 2px 4px; border-radius: 2px; margin-right: 4px; /*display: none;*/ } /* 评论人 */ .feedbackListSubtitle a[target="_blank"] { color: #FF6969 !important; } /* 评论时间 */ .feedbackItem .comment_date { color: #BCBCBC; margin-right: 4px; } /* 楼主颜色 */ .feedbackListSubtitle { color: #0AB300; } /* 支持与反对 */ .comment_vote { float: right; margin-top: -34px; display: none; } /* 鼠标经过时显示支持与反对 */ .feedbackItem:hover .comment_vote { display: block; } /* 评论内容颜色 */ .feedbackItem { color: #464646; position: relative; } /* 评论背景色 */ .blog_comment_body { background: #B2E866; float: left; padding: 14px 10px; border-radius: 5px; position: relative; overflow: visible; margin-left: 33px; max-width: 580px; } /* 评论三角形 */ .blog_comment_body:before { content: ''; display: block; position: absolute; left: -17px; top: 9px; width: 0; height: 0; border-right: solid 18px #B2E866; border-top: solid 6px rgba(0, 0, 0, 0); border-bottom: solid 10px rgba(0, 0, 0, 0); } /* 评论头像 */ .blog_comment_body:after { content: attr(data-louceng); display: none; width: 48px; height: 48px; position: absolute; left: -72px; top: 0px; text-align: center; line-height: 48px; font-size: 18px; color: #FFF; text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.42); font-family: 'Microsoft Yahei'; background: linear-gradient(top , rgb(116, 218, 45) 12% , rgb(135, 255, 75) 35% , rgb(71, 179, 28) 86%); background: -o-linear-gradient(top , rgb(116, 218, 45) 12% , rgb(135, 255, 75) 35% , rgb(71, 179, 28) 86%); background: -ms-linear-gradient(top , rgb(116, 218, 45) 12% , rgb(135, 255, 75) 35% , rgb(71, 179, 28) 86%); background: -moz-linear-gradient(top , rgb(116, 218, 45) 12% , rgb(135, 255, 75) 35% , rgb(71, 179, 28) 86%); background: -webkit-linear-gradient(top , #74DA2D 12% , #87FF4B 35% , #47B31C 86%); background-size: contain; } #blog-comments-placeholder .feedbackItem:nth-child(10n+0) .blog_comment_body:after { background-image: url(//files.cnblogs.com/files/liuxianan/auto_avatar_00.bmp); } #blog-comments-placeholder .feedbackItem:nth-child(10n+1) .blog_comment_body:after { background-image: url(//files.cnblogs.com/files/liuxianan/auto_avatar_01.bmp); } #blog-comments-placeholder .feedbackItem:nth-child(10n+2) .blog_comment_body:after { background-image: url(//files.cnblogs.com/files/liuxianan/auto_avatar_02.bmp); } #blog-comments-placeholder .feedbackItem:nth-child(10n+3) .blog_comment_body:after { background-image: url(//files.cnblogs.com/files/liuxianan/auto_avatar_03.bmp); } #blog-comments-placeholder .feedbackItem:nth-child(10n+4) .blog_comment_body:after { background-image: url(//files.cnblogs.com/files/liuxianan/auto_avatar_04.bmp); } #blog-comments-placeholder .feedbackItem:nth-child(10n+5) .blog_comment_body:after { background-image: url(//files.cnblogs.com/files/liuxianan/auto_avatar_05.bmp); } #blog-comments-placeholder .feedbackItem:nth-child(10n+6) .blog_comment_body:after { background-image: url(//files.cnblogs.com/files/liuxianan/auto_avatar_06.bmp); } #blog-comments-placeholder .feedbackItem:nth-child(10n+7) .blog_comment_body:after { background-image: url(//files.cnblogs.com/files/liuxianan/auto_avatar_07.bmp); } #blog-comments-placeholder .feedbackItem:nth-child(10n+8) .blog_comment_body:after { background-image: url(//files.cnblogs.com/files/liuxianan/auto_avatar_08.bmp); } #blog-comments-placeholder .feedbackItem:nth-child(10n+9) .blog_comment_body:after { background-image: url(//files.cnblogs.com/files/liuxianan/auto_avatar_09.bmp); } /* 清除浮动 */ .feedbackCon:after { content: ''; display: block; clear: both; } /* 引用边框 */ .comment_quote { border: 1px solid #63921F; border-radius: 3px; } /* 隐藏小图标 */ .feedbackItem .sendMsg2This { display: none; } /* 评论结束 */ .clearfix {zoom: 1;} .clearfix:before,.clearfix:after {content: "";display: table;} .clearfix:after {clear: both;} /*好看的滚动条*/ ::-webkit-scrollbar{ width:10px!important; height:10px!important; -webkit-appearance:none; } ::-webkit-scrollbar-thumb{ height:5px;border:1px solid transparent; border-top:none;border-bottom:none; -webkit-border-radius:6px; background-color:rgba(0,0,0,.3); background-clip:padding-box; } /*鼠标图案*/ body {cursor: url(https://files.cnblogs.com/files/cn-suqingnian/1527300524.cur.ico), auto;} /*a:hover { cursor:url("//images.cnblogs.com/cnblogs_com/zwfymqz/1099678/o_cywl2.png"),auto;}#header:before*/ /*雪花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; } /*雪花css end*/
2.博客侧边栏
(0).一定要加上这个。
<script src="http://cdn.bootcss.com/jquery/2.2.0/jquery.min.js"> </script>
(1).$prtty \ print$的代码高亮
<script type="text/javascript"> !function(){var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; (function(){function S(a){function d(e){var b=e.charCodeAt(0);if(b!==92)return b;var a=e.charAt(1);return(b=r[a])?b:"0"<=a&&a<="7"?parseInt(e.substring(1),8):a==="u"||a==="x"?parseInt(e.substring(2),16):e.charCodeAt(1)}function g(e){if(e<32)return(e<16?"\\x0":"\\x")+e.toString(16);e=String.fromCharCode(e);return e==="\\"||e==="-"||e==="]"||e==="^"?"\\"+e:e}function b(e){var b=e.substring(1,e.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),e=[],a= b[0]==="^",c=["["];a&&c.push("^");for(var a=a?1:0,f=b.length;a<f;++a){var h=b[a];if(/\\[bdsw]/i.test(h))c.push(h);else{var h=d(h),l;a+2<f&&"-"===b[a+1]?(l=d(b[a+2]),a+=2):l=h;e.push([h,l]);l<65||h>122||(l<65||h>90||e.push([Math.max(65,h)|32,Math.min(l,90)|32]),l<97||h>122||e.push([Math.max(97,h)&-33,Math.min(l,122)&-33]))}}e.sort(function(e,a){return e[0]-a[0]||a[1]-e[1]});b=[];f=[];for(a=0;a<e.length;++a)h=e[a],h[0]<=f[1]+1?f[1]=Math.max(f[1],h[1]):b.push(f=h);for(a=0;a<b.length;++a)h=b[a],c.push(g(h[0])), h[1]>h[0]&&(h[1]+1>h[0]&&c.push("-"),c.push(g(h[1])));c.push("]");return c.join("")}function s(e){for(var a=e.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),c=a.length,d=[],f=0,h=0;f<c;++f){var l=a[f];l==="("?++h:"\\"===l.charAt(0)&&(l=+l.substring(1))&&(l<=h?d[l]=-1:a[f]=g(l))}for(f=1;f<d.length;++f)-1===d[f]&&(d[f]=++x);for(h=f=0;f<c;++f)l=a[f],l==="("?(++h,d[h]||(a[f]="(?:")):"\\"===l.charAt(0)&&(l=+l.substring(1))&&l<=h&& (a[f]="\\"+d[l]);for(f=0;f<c;++f)"^"===a[f]&&"^"!==a[f+1]&&(a[f]="");if(e.ignoreCase&&m)for(f=0;f<c;++f)l=a[f],e=l.charAt(0),l.length>=2&&e==="["?a[f]=b(l):e!=="\\"&&(a[f]=l.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return a.join("")}for(var x=0,m=!1,j=!1,k=0,c=a.length;k<c;++k){var i=a[k];if(i.ignoreCase)j=!0;else if(/[a-z]/i.test(i.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){m=!0;j=!1;break}}for(var r={b:8,t:9,n:10,v:11, f:12,r:13},n=[],k=0,c=a.length;k<c;++k){i=a[k];if(i.global||i.multiline)throw Error(""+i);n.push("(?:"+s(i)+")")}return RegExp(n.join("|"),j?"gi":"g")}function T(a,d){function g(a){var c=a.nodeType;if(c==1){if(!b.test(a.className)){for(c=a.firstChild;c;c=c.nextSibling)g(c);c=a.nodeName.toLowerCase();if("br"===c||"li"===c)s[j]="\n",m[j<<1]=x++,m[j++<<1|1]=a}}else if(c==3||c==4)c=a.nodeValue,c.length&&(c=d?c.replace(/\r\n?/g,"\n"):c.replace(/[\t\n\r ]+/g," "),s[j]=c,m[j<<1]=x,x+=c.length,m[j++<<1|1]= a)}var b=/(?:^|\s)nocode(?:\s|$)/,s=[],x=0,m=[],j=0;g(a);return{a:s.join("").replace(/\n$/,""),d:m}}function H(a,d,g,b){d&&(a={a:d,e:a},g(a),b.push.apply(b,a.g))}function U(a){for(var d=void 0,g=a.firstChild;g;g=g.nextSibling)var b=g.nodeType,d=b===1?d?a:g:b===3?V.test(g.nodeValue)?a:d:d;return d===a?void 0:d}function C(a,d){function g(a){for(var j=a.e,k=[j,"pln"],c=0,i=a.a.match(s)||[],r={},n=0,e=i.length;n<e;++n){var z=i[n],w=r[z],t=void 0,f;if(typeof w==="string")f=!1;else{var h=b[z.charAt(0)]; if(h)t=z.match(h[1]),w=h[0];else{for(f=0;f<x;++f)if(h=d[f],t=z.match(h[1])){w=h[0];break}t||(w="pln")}if((f=w.length>=5&&"lang-"===w.substring(0,5))&&!(t&&typeof t[1]==="string"))f=!1,w="src";f||(r[z]=w)}h=c;c+=z.length;if(f){f=t[1];var l=z.indexOf(f),B=l+f.length;t[2]&&(B=z.length-t[2].length,l=B-f.length);w=w.substring(5);H(j+h,z.substring(0,l),g,k);H(j+h+l,f,I(w,f),k);H(j+h+B,z.substring(B),g,k)}else k.push(j+h,w)}a.g=k}var b={},s;(function(){for(var g=a.concat(d),j=[],k={},c=0,i=g.length;c<i;++c){var r= g[c],n=r[3];if(n)for(var e=n.length;--e>=0;)b[n.charAt(e)]=r;r=r[1];n=""+r;k.hasOwnProperty(n)||(j.push(r),k[n]=q)}j.push(/[\S\s]/);s=S(j)})();var x=d.length;return g}function v(a){var d=[],g=[];a.tripleQuotedStrings?d.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?d.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, q,"'\"`"]):d.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&g.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var b=a.hashComments;b&&(a.cStyleComments?(b>1?d.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):d.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),g.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,q])):d.push(["com", /^#[^\n\r]*/,q,"#"]));a.cStyleComments&&(g.push(["com",/^\/\/[^\n\r]*/,q]),g.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));if(b=a.regexLiterals){var s=(b=b>1?"":"\n\r")?".":"[\\S\\s]";g.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+("/(?=[^/*"+b+"])(?:[^/\\x5B\\x5C"+b+"]|\\x5C"+s+"|\\x5B(?:[^\\x5C\\x5D"+b+"]|\\x5C"+ s+")*(?:\\x5D|$))+/")+")")])}(b=a.types)&&g.push(["typ",b]);b=(""+a.keywords).replace(/^ | $/g,"");b.length&&g.push(["kwd",RegExp("^(?:"+b.replace(/[\s,]+/g,"|")+")\\b"),q]);d.push(["pln",/^\s+/,q," \r\n\t\u00a0"]);b="^.[^\\s\\w.$@'\"`/\\\\]*";a.regexLiterals&&(b+="(?!s*/)");g.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/, q],["pun",RegExp(b),q]);return C(d,g)}function J(a,d,g){function b(a){var c=a.nodeType;if(c==1&&!x.test(a.className))if("br"===a.nodeName)s(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)b(a);else if((c==3||c==4)&&g){var d=a.nodeValue,i=d.match(m);if(i)c=d.substring(0,i.index),a.nodeValue=c,(d=d.substring(i.index+i[0].length))&&a.parentNode.insertBefore(j.createTextNode(d),a.nextSibling),s(a),c||a.parentNode.removeChild(a)}}function s(a){function b(a,c){var d= c?a.cloneNode(!1):a,e=a.parentNode;if(e){var e=b(e,1),g=a.nextSibling;e.appendChild(d);for(var i=g;i;i=g)g=i.nextSibling,e.appendChild(i)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),d;(d=a.parentNode)&&d.nodeType===1;)a=d;c.push(a)}for(var x=/(?:^|\s)nocode(?:\s|$)/,m=/\r\n?|\n/,j=a.ownerDocument,k=j.createElement("li");a.firstChild;)k.appendChild(a.firstChild);for(var c=[k],i=0;i<c.length;++i)b(c[i]);d===(d|0)&&c[0].setAttribute("value",d);var r=j.createElement("ol"); r.className="linenums";for(var d=Math.max(0,d-1|0)||0,i=0,n=c.length;i<n;++i)k=c[i],k.className="L"+(i+d)%10,k.firstChild||k.appendChild(j.createTextNode("\u00a0")),r.appendChild(k);a.appendChild(r)}function p(a,d){for(var g=d.length;--g>=0;){var b=d[g];F.hasOwnProperty(b)?D.console&&console.warn("cannot override language handler %s",b):F[b]=a}}function I(a,d){if(!a||!F.hasOwnProperty(a))a=/^\s*</.test(d)?"default-markup":"default-code";return F[a]}function K(a){var d=a.h;try{var g=T(a.c,a.i),b=g.a; a.a=b;a.d=g.d;a.e=0;I(d,b)(a);var s=/\bMSIE\s(\d+)/.exec(navigator.userAgent),s=s&&+s[1]<=8,d=/\n/g,x=a.a,m=x.length,g=0,j=a.d,k=j.length,b=0,c=a.g,i=c.length,r=0;c[i]=m;var n,e;for(e=n=0;e<i;)c[e]!==c[e+2]?(c[n++]=c[e++],c[n++]=c[e++]):e+=2;i=n;for(e=n=0;e<i;){for(var p=c[e],w=c[e+1],t=e+2;t+2<=i&&c[t+1]===w;)t+=2;c[n++]=p;c[n++]=w;e=t}c.length=n;var f=a.c,h;if(f)h=f.style.display,f.style.display="none";try{for(;b<k;){var l=j[b+2]||m,B=c[r+2]||m,t=Math.min(l,B),A=j[b+1],G;if(A.nodeType!==1&&(G=x.substring(g, t))){s&&(G=G.replace(d,"\r"));A.nodeValue=G;var L=A.ownerDocument,o=L.createElement("span");o.className=c[r+1];var v=A.parentNode;v.replaceChild(o,A);o.appendChild(A);g<l&&(j[b+1]=A=L.createTextNode(x.substring(t,l)),v.insertBefore(A,o.nextSibling))}g=t;g>=l&&(b+=2);g>=B&&(r+=2)}}finally{if(f)f.style.display=h}}catch(u){D.console&&console.log(u&&u.stack||u)}}var D=window,y=["break,continue,do,else,for,if,return,while"],E=[[y,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], "catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],M=[E,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],N=[E,"abstract,assert,boolean,byte,extends,final,finally,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"], O=[N,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],E=[E,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],P=[y,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], Q=[y,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],W=[y,"as,assert,const,copy,drop,enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"],y=[y,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],R=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/, V=/\S/,X=v({keywords:[M,O,E,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",P,Q,y],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),F={};p(X,["default-code"]);p(C([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-", /^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);p(C([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/], ["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);p(C([],[["atv",/^[\S\s]+/]]),["uq.val"]);p(v({keywords:M,hashComments:!0,cStyleComments:!0,types:R}),["c","cc","cpp","cxx","cyc","m"]);p(v({keywords:"null,true,false"}),["json"]);p(v({keywords:O,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:R}), ["cs"]);p(v({keywords:N,cStyleComments:!0}),["java"]);p(v({keywords:y,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]);p(v({keywords:P,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]);p(v({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]);p(v({keywords:Q, hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]);p(v({keywords:E,cStyleComments:!0,regexLiterals:!0}),["javascript","js"]);p(v({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);p(v({keywords:W,cStyleComments:!0,multilineStrings:!0}),["rc","rs","rust"]); p(C([],[["str",/^[\S\s]+/]]),["regex"]);var Y=D.PR={createSimpleLexer:C,registerLangHandler:p,sourceDecorator:v,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:D.prettyPrintOne=function(a,d,g){var b=document.createElement("div");b.innerHTML="<pre>"+a+"</pre>";b=b.firstChild;g&&J(b,g,!0);K({h:d,j:g,c:b,i:1}); return b.innerHTML},prettyPrint:D.prettyPrint=function(a,d){function g(){for(var b=D.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity;i<p.length&&c.now()<b;i++){for(var d=p[i],j=h,k=d;k=k.previousSibling;){var m=k.nodeType,o=(m===7||m===8)&&k.nodeValue;if(o?!/^\??prettify\b/.test(o):m!==3||/\S/.test(k.nodeValue))break;if(o){j={};o.replace(/\b(\w+)=([\w%+\-.:]+)/g,function(a,b,c){j[b]=c});break}}k=d.className;if((j!==h||e.test(k))&&!v.test(k)){m=!1;for(o=d.parentNode;o;o=o.parentNode)if(f.test(o.tagName)&& o.className&&e.test(o.className)){m=!0;break}if(!m){d.className+=" prettyprinted";m=j.lang;if(!m){var m=k.match(n),y;if(!m&&(y=U(d))&&t.test(y.tagName))m=y.className.match(n);m&&(m=m[1])}if(w.test(d.tagName))o=1;else var o=d.currentStyle,u=s.defaultView,o=(o=o?o.whiteSpace:u&&u.getComputedStyle?u.getComputedStyle(d,q).getPropertyValue("white-space"):0)&&"pre"===o.substring(0,3);u=j.linenums;if(!(u=u==="true"||+u))u=(u=k.match(/\blinenums\b(?::(\d+))?/))?u[1]&&u[1].length?+u[1]:!0:!1;u&&J(d,u,o);r= {h:m,c:d,j:u,i:o};K(r)}}}i<p.length?setTimeout(g,250):"function"===typeof a&&a()}for(var b=d||document.body,s=b.ownerDocument||document,b=[b.getElementsByTagName("pre"),b.getElementsByTagName("code"),b.getElementsByTagName("xmp")],p=[],m=0;m<b.length;++m)for(var j=0,k=b[m].length;j<k;++j)p.push(b[m][j]);var b=q,c=Date;c.now||(c={now:function(){return+new Date}});var i=0,r,n=/\blang(?:uage)?-([\w.]+)(?!\S)/,e=/\bprettyprint\b/,v=/\bprettyprinted\b/,w=/pre|xmp/i,t=/^code$/i,f=/^(?:pre|code|xmp)$/i, h={};g()}};typeof define==="function"&&define.amd&&define("google-code-prettify",[],function(){return Y})})();}() /*初始化prettyPrint*/ jQuery(window).load(function(){ jQuery("pre").addClass("prettyprint"); prettyPrint(); }) </script> <style> /* Tomorrow Night Eighties Theme */ /* Original theme - https://github.com/chriskempson/tomorrow-theme */ /* css88 0.1*/ /* 代码框外边框。 如有需要可以自己调。 .prettyprint,pre.prettyprint { background-color: #fff; border: 1px solid #272822; overflow: hidden; padding: 0px; margin: 20px 0; font: 14px/20px 'courier new'; color: #fff; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; } */ /* 行数与代码之间的横线。 .prettyprint.linenums, pre.prettyprint.linenums { -webkit-box-shadow: inset 40px 0 0 #eee, inset 41px 0 0 #464741; -moz-box-shadow: inset 40px 0 0 #eee, inset 41px 0 0 #464741; box-shadow: inset 40px 0 0 #eee, inset 41px 0 0 #464741; } */ .prettyprint.linenums ol, pre.prettyprint.linenums ol { margin: 0 0 0 10px; font-family:Lucida Handwriting, sans-serif; } .prettyprint.linenums ol li, pre.prettyprint.linenums ol li { padding-left: 5px; color: #8a8a97; line-height: 20px; margin-left: 0; list-style: decimal; font-family:Lucida Handwriting, sans-serif; } .prettyprint ol.linenums{ margin-bottom: 0;/*margin-bottom: -8px; margin-top:-8px; margin-right: -8px; position:relative;*/background-color: #272822; padding: 8px} .prettyprint .com { color: #93a1a1; } .prettyprint .lit { color: #AE81FF; } .prettyprint .pun, .prettyprint .opn, .prettyprint .clo { color: #F8F8F2; } .prettyprint .fun { color: #dc322f; } .prettyprint .str, .prettyprint .atv { color: #E6DB74; } .prettyprint .kwd, .prettyprint .tag { color: #F92659; } .prettyprint .typ, .prettyprint .atn, .prettyprint .dec, .prettyprint .var { color: #A6E22E; } .prettyprint .pln { color: #66D9EF; } </style> <script> $("pre").addClass("prettyprint linenums"); prettyPrint(); </script>
(2).与页面定制CSS最后几行的雪花CSS一起的$html$
<div class="Snow"> <canvas id="Snow"></canvas> </div> <script src="https://files.cnblogs.com/files/cn-suqingnian/snow.js"></script>
(3).其他要在公告栏添加的东东简介
访客数量:<br> <img src="http://cc.amazingcounters.com/counter.php?i=3222245&c=9667048"/> <br> <!cc.amazingcounters.com 这个网站有访客量的ulr,可以建一个。添加代码时将此行删掉> 友链:<br> <a target="_blank" href="https://www.cnblogs.com/cn-suqingnian/"> juruo<br></a> <a target="_blank" href="https://www.cnblogs.com/Capella/"> Capella<br></a> <a target="_blank" href="https://www.cnblogs.com/Equinox-Flower/"> 沙华dalao<br></a> <a target="_blank" href="https://www.cnblogs.com/Alan-Luo/">杜宇一声<br></a> <! <a target="_blank" href="https://友链网址">想要显示的字<br></a> (添加代码时将此行删掉)>
3.页首$html$
(1).右上角添加$guithub$链接
<a href="https://github.com/cn-suqingnian" target="_blank"> <img style="position: fixed; top: 0; right: 0; border: 0; z-index: 1;" src="http://images.cnblogs.com/cnblogs_com/jackson0714/779808/o_github.png" > </a>
(2).当$title$移开是显示的
<script> // 浏览器标题切换 var OriginTitile = document.title; // 保存之前页面标题 var titleTime; document.addEventListener('visibilitychange', function(){ if (document.hidden){ document.title ='你不要我了么?qwq'; //这里可以改变想要显示的字 clearTimeout(titleTime); }else{ document.title = '我喜欢你啊。'; //回来的字体 titleTime = setTimeout(function() { document.title = OriginTitile; }, 1000); // 2秒后恢复原标题 } }); </script>
(3).$icon$
<script type="text/javascript" language="javascript"> //Setting ico for cnblogs var linkObject = document.createElement('link'); linkObject.rel = "shortcut icon"; linkObject.href = "https://files.cnblogs.com/files/cn-suqingnian/bitbug_favicon.ico";//ps:必须是.ico的格式 document.getElementsByTagName("head")[0].appendChild(linkObject); </script>
4.页脚$html$
鼠标点击特效。
<script type="text/javascript" language="javascript"> var getRandomColor = function(){ //随机生成颜色。 return '#' + (function(color){ return (color += '0123456789abcdef'[Math.floor(Math.random()*16)]) && (color.length == 6) ? color : arguments.callee(color); })(''); } onload = function() { var click_cnt = 0; var $html = document.getElementsByTagName("html")[0]; var $body = document.getElementsByTagName("body")[0]; $html.onclick = function(e) { var $elem = document.createElement("b"); $elem.style.color = getRandomColor(); $elem.style.zIndex = 9999; $elem.style.position = "absolute"; $elem.style.select = "none"; var x = e.pageX; var y = e.pageY; // var st= new Array("\u82CF","\u537F","\u5FF5","\u662F","\u6700","\u83DC","\u7684"); //苏卿念是OI最菜的苏卿念是最菜的 // var st= new Array("\u6211","\u559C","\u6B22","\u4F60","\u554A","\u2026","\u2026"); //我喜欢你啊……我喜欢你啊…… var st= new Array("\u4F60","\u7279","\u522B","\u597D","\uFF0C","\u6211","\u559C","\u6B22","\u4F60","\u3002"); //你特别好,我喜欢你。你特别好,我喜欢你。 // var st= new Array("\u");//这里面加想要输入的字的utf-8字符。可以想加多少个就加。 $elem.style.left = (x - 10) + "px"; $elem.style.top = (y - 20) + "px"; //$elem.innerText = "OωO"; clearInterval(anim); $elem.innerText = st[click_cnt%10];//%的数是加的字的个数。 click_cnt++; $elem.style.fontSize = Math.random() * 10 + 15 + "px"; //随机生成大小 var increase = 0; var anim; setTimeout(function() { anim = setInterval(function() { //increase是停留时间 if (++increase == 200) { clearInterval(anim); $body.removeChild($elem); } $elem.style.top = y - 20 - increase + "px"; $elem.style.opacity = (200 - increase) / 120; }, 8); }, 70); $body.appendChild($elem); }; }; </script>
好了,大体就这样了,有不需要的直接注释掉就好。
剩下一些好玩的东东会不定期更新呦~