前端时间发布了博客搬家通告。但是由于效果不佳,和要参加考试等原因暂停了对博客园的博客。可是它的主题个人感觉挺好看,为了留作纪念,特来开源。

页面定制CSS代码


iframe{display:none;
}.c_ad_block{display:none;
}*{ cursor:url(https://blog-static.cnblogs.com/files/blogs/746240/mouse.ico?t=1649297601),auto;}/* 诗句 */
.poem {background: linear-gradient(to right, #90caf9, #047edf 99%);border-radius: 4px;color: #fff;padding: 40px 20px;
}.poem #poem_sentence {text-align: center;font-size: 20px;
}.poem #poem_info {text-align: right;
}/** 捷径 **/
.shortcut {overflow: hidden;border-radius: 4px;background: var(--BlockColor);word-break: break-all;z-index: 999999999999999999;transition: height 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) 0s;
}.shortcut h3 {margin: 20px 0;border-left: 4px solid var(--ThemeColor);padding-left: 10px;
}#shortcutContent {padding: 0 !important;margin: 20px;
}/*个人签名*/
#MySignature {display: block !important;
}/****** 提示消息框 *******/
.infocard {border-radius: 4px;margin: 0 0 20px 0;padding: 10px;line-height: 2;
}.infocard i {float: left;margin: 0 10px;vertical-align: middle !important;
}.tip {background-color: #d5f1e5;color: #20704d;}.warning {background-color: #f9e8de;color: #a84229;
}.normal {background-color: #dfedf8;color: #3162ae;
}/* 折叠 */
details {border: 1px solid #ddd;border-radius: 4px;padding: .5em .5em 0;margin: 10px 0;
}summary {font-weight: bold;margin: -.5em -.5em 0;padding: .5em;outline: none;user-select: none;background-color: #eff3f5;border-radius: 4px;
}details[open] {padding: .5em;
}details[open] summary {border-bottom: 1px solid #ddd;margin-bottom: .5em;border-radius: 4px 4px 0 0;
}/*** 全局主题颜色 ***/
html {--ThemeColor: #2e73ff;--ThemeColorDark: #2d6dca;--AidColor1: #fa7d00;--AidColor2: #ff2e2e;--AidColor3: #36c67d;--TextColor1: #141418;--TextColor2: #5f5f6b;--TextColor3: #97979f;--DividColor: #e7eaf0;--BlockColor:#fff;--BackgroundColor: #f4f6fa;--text1: 28px;--text2: 26px;--text3: 24px;--text4: 22px;--text5: 20px;--text6: 18px;
}#card {background-color: var(--BlockColor);border-radius: 8px;width: 100%;margin: 20px 0;border: 1px solid rgba(120, 130, 140, 0.13);
}#card:hover {box-shadow: 6px 11px 41px -28px #a99de7;
}#card p {margin: 0 !important;
}#proBody center {background: rgba(0, 0, 0, .6);padding: 20px;border-radius: 8px 8px 0 0;
}#proBody {background-color: #000;filter: Alpha(opacity=80);border-radius: 8px 8px 0 0;background-image: url(https://img2018.cnblogs.com/blog/1489774/201910/1489774-20191020231410445-431305917.jpg);background-repeat: no-repeat;background-position: center;}#proBody img {width: 100px;border-radius: 50%;border: 1px solid #F0F8FF;
}#proBody .name {font-size: 28px;color: white;font-weight: 700;
}#proBody .sign {/*color: #8898aa;*/color: white;
}#proBody .contact {background-color: #4d7cff;width: 200px !important;color: white;margin: 20px 0;padding: 10px 20px;border: 1px solid #4d7cff;border-radius: 80px;outline: none;
}#proBody .contact:hover {opacity: 0.8;
}#proFooter {columns: 3;padding: 20px;text-align: center;border-top: 1px solid rgba(120, 130, 140, 0.13);
}#proFooter ul {margin-left: 0 !important;
}#proFooter li {list-style: none !important;line-height: 2;
}#proFooter li:nth-child(1),
#proFooter li:nth-child(2) {border-right: 1px solid rgba(120, 130, 140, 0.13);
}/* 博客底部功能*/
#div_digg {width: 220px !important;
}.buryit:hover,
.diggit:hover {opacity: 0.8;
}.diggit {background: none !important;color: white !important;background-color: var(--AidColor3) !important;border: 1px solid var(--AidColor3) !important;padding: 6px 10px;width: auto !important;height: auto !important;border-radius: 4px;
}#digg_count {color: white !important;
}.diggit:after {content: '智齿';
}.buryit {background: none !important;color: white !important;background-color: var(--AidColor1) !important;border: 1px solid var(--AidColor1) !important;padding: 6px 10px;width: auto !important;height: auto !important;border-radius: 4px;
}#bury_count {color: white !important;
}.buryit:after {content: '反对';
}/****博文签名信息*****/
.myPostSignature {padding: 12px 24px 12px 30px;margin-top: 15px;margin-left: 5px;border-left-width: 4px;font-size: 15px;line-height: 2;border-left-style: solid;background-color: #f8f8f8;position: relative;border-bottom-right-radius: 2px;border-top-right-radius: 2px;border-left-color: var(--ThemeColor);z-index: 1
}.myPostSignature:before {content: "!";background-color: var(--ThemeColor);position: absolute;top: 25px;left: -12px;color: #fff;width: 20px;height: 20px;border-radius: 100%;text-align: center;line-height: 20px;font-weight: 700;font-size: 14px
}.myPostSignature p {margin: 0 !important;word-wrap: break-word;word-break: break-all;overflow: hidden;
}/*************/
/********** 适配360以上的移动端 **********/
@media only screen and (min-width: 361px) and (max-width: 767px) {/*相册*/#ViewPicture1_GalleryImage {max-width: 100% !important;}/* 内容板块 */#mainContent {float: left !important;margin-left: 0;}#main {margin: 20px auto 20px auto;padding: 0 !important;width: 1200px !important;}#sideBar {float: right !important;width: 260px !important;}/* 底部页脚板块 */#footer,#page_end_html {width: 1200px !important;}#sidebar_search_box input[type=text] {width: 140px !important;}#headbox {width: 100% !important;display: inline-block;/*padding: 0 5px;*/min-width: initial !important;}#green_channel {width: 100% !important;display: none;}
}/********** 适配360以下的移动端 **********/
@media only screen and (max-width: 360px) {#header .dropdown li {line-height: 2.8 !important;margin-left: 4px;}#green_channel {width: 100% !important;}#header,#headbox {width: 100% !important;display: inline-block;overflow-x: auto;overflow-y: hidden;white-space: nowrap;min-width: initial !important;}#comment_form {margin: 0 !important;padding: 0 !important;}.day .postDesc {display: none !important;}#blogTitle {width: initial !important;margin-right: 10px !important;}.avatar {width: 50px !important;}.mytoolbar {position: fixed;z-index: 9999999999;bottom: 0;left: 0;right: 0;padding: 10px;font-size: 20px;background-color: var(--BlockColor);border-top: 1px solid var(--DividColor);}#sidebar_scroller {position: fixed !important;top: 0 !important;left: 0 !important;right: 0 !important;bottom: 20px;width: 90% !important;display: none;border-bottom: 1px solid #eee;z-index: 9999999999999999;}.mytoolbar #toolbtn {columns: 3;margin-left: 0 !important;/*padding: 10px 0;*/}.mytoolbar #toolbtn li {text-align: center;list-style-type: none !important;line-height: 18px;}.c_b_p_desc .desc_img,.entrylistItem .desc_img,.day .desc_img {float: none;margin: 20px 0 !important;width: 100% !important;max-width: 100% !important;}#mainContent .c_b_p_desc {display: grid !important;}.c_b_p_desc a {margin: 10px 0 !important;/*width: 94% !important;*/line-height: 30px !important;text-align: center;padding: 4px 9px !important;color: #313131 !important;background-color: #ededed !important;border: 1px solid #ededed !important;font-size: 14px !important;height: 30px !important;float: left !important;}.c_b_p_desc a:hover {border: 1px solid #2080f7 !important;background-color: #fff !important;}.btn_my_zzk {/*display: none !important;*/}#header .dropdown {float: right;margin-right: 20px;}#header .dropdown-content {margin-left: -70px;}#header li {list-style: none;padding: 0 6px;}#navigator .div_my_zzk {float: left !important;}#navigator .input_my_zzk {width: 160px !important;}#home,#main {width: initial !important;/*padding:0!important;*//*min-width:min-content!important;*/}#mainContent,#footer,#page_end_html {width: initial !important;min-width: initial !important;}#sideBar {width: initial !important;margin-left: 0 !important;}#navList {display: flex;margin-right: 20px;}#navList li {float: left;list-style: none;margin: 0 !important;}
}/********** 全局样式 **********/
* {margin: 0;padding: 0
}body {background-color: var(--BackgroundColor);font-size: 16px;line-height: 1.5;letter-spacing: 1px;
}div {display: block
}a {text-decoration: none;color: inherit;/*color: var(--TextColor1)*/
}a:hover {color: var(--ThemeColor);
}h1,
h2,
h3,
h4,
h5,
h6 {color: var(--TextColor1)
}/********** 页面布局 **********//***** 主界面 *****/
#home {width: 100%;margin: 0 auto;
}/***** 导航栏(上) *****/
#header {height: 50px;line-height: 50px;background-color: var(--BlockColor);margin: 0 auto;width: 1200px;display: flex;/*box-shadow: rgba(0, 0, 0, 0.1) 0 1px 2px;*//*position: fixed;left: 0;top: 0;z-index: 1000;*/
}/***** 主板块(中) *****//** 主板块 **/
#main {width: 100%;width: 1200px;margin: 20px auto 20px auto;/*display: flex;*/
}/** 主要内容(中左) **/
#mainContent {width: 900px;float: left;/*flex:1;*//*background-color: var(--BlockColor);*/padding: 0px;border-radius: 2px
}/** 侧边栏(中右) **/
#sideBar {width: 280px;margin-left: 20px;float: left
}/***** 页脚(下) *****/
#footer {width: 100%;margin-top: 40px;padding: 20px 0;text-align: center;color: var(--TextColor3);
}#viewcount {width: 100%;color: var(--TextColor3);text-align: center;margin-bottom: 20px;
}/***** 导航栏内容布局 *****/
/** 博客昵称 **/
#lnkBlogLogo {display: none;
}/** 博客昵称 **/
#blogTitle h1 {width: auto;/*max-width:100px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;*/font-size: 20px;line-height: 50px;margin: auto 20px;
}#blogTitle h2 {display: none;
}/** 导航按钮 **/
#navigator {flex: 1;line-height: 50px;margin: 0 20px 0 0;
}#navList li {float: left;list-style: none;margin: 0 10px;}#navList li a {padding: 13px 0;
}#navList li a:hover {border-bottom: 3px solid var(--ThemeColor);}/** 博客状态 **/
.blogStats {float: right;display: none;
}/***** 主要内容布局 *****/
/* 当日文章 */
.day {background-color: var(--BlockColor);padding: 20px;border-radius: 4px;margin-bottom: 20px;
}.day .postTitle {border-top: 1px solid var(--DividColor);margin-top: 10px;padding-top: 10px;
}/* 发布日期 */
.dayTitle {line-height: 2.4;width: 100%;font-size: var(--text6);color: var(--TextColor1);/*border-bottom: 1px solid var(--DividColor);*/
}/* 文章标题 */
.day .postTitle2 {font-size: var(--text4);line-height: 2.4;/*color: var(--TextColor1);*/padding-left: 10px;border-left: 4px solid var(--ThemeColor);
}#topics .postTitle {line-height: 1.2;text-align: center;padding: 0 0 20px 0;margin-bottom: 20px;
}#topics .postDesc,
#topics #BlogPostCategory {line-height: 2.4;
}/* 文章内容 */
.c_b_p_desc {color: var(--TextColor2);line-height: 1.5;
}/* 文章发布相关信息 */.postDesc,
.post .postBody #BlogPostCategory,
#EntryTag {color: var(--TextColor3);font-size: 14px;line-height: 2;margin: 0;
}/* 文章摘要图片 */
.desc_img {max-height: 150px;max-width: 300px;margin-left: 20px;
}/***** 侧边栏内容布局 *****//** 侧边栏板块标题 **/
#sideBar h3 {line-height: 2.4;width: 100%;margin-bottom: 10px;font-size: var(--text6);color: var(--TextColor1);border-bottom: 1px solid var(--DividColor);
}/*** 公告栏面板 ***/
/*个人信息*/
.myprofile {margin: 20px 0 0 0;/*display: table;*//*width:100%;*/height: auto;
}.myprofile-bottom {padding: 20px 0;border-top: 1px solid var(--DividColor);
}.myprofile-top {display: inline-flex;margin: 0px auto 20px auto;
}.avatar {width: 80px;float: left;
}.avatar img {width: 100%;/*height: 100%;*/border: 1px solid #ddd;border-radius: 50%;
}.profile-info {float: left;margin-left: 20px;
}.nickname {font-size: 20px;line-height: 30px;font-weight: 600;
}#mywords {line-height: 20px;font-size: 12px;
}.myprofile ul {columns: 3;}.myprofile ul li {text-align: center;list-style-type: none;line-height: 20px;}#sidebar_news {background-color: var(--BlockColor);padding: 20px;border-radius: 4px;margin-bottom: 20px;
}/* 公告栏信息 */
#profile_block {line-height: 2;
}/* 加关注 */
#p_b_follow {background-color: var(--ThemeColor);border-radius: 4px;margin: 10px 0;line-height: 2;text-align: center;}#p_b_follow:hover {background-color: var(--ThemeColorDark);
}/* 关注成功 */
#p_b_follow a,
#p_b_follow span {color: white !important;
}/* 日历面板 */
#blog-calendar {background-color: var(--BlockColor);padding: 20px;border-radius: 4px;margin-bottom: 20px;
}/* 日历翻页 */
.CalTitle {line-height: 2.4;font-size: var(--text6);color: var(--TextColor1);
}/* 日历星期 */
.CalDayHeader {line-height: 2.4;font-size: var(--text6);color: var(--TextColor1);border-bottom: 1px solid var(--DividColor);
}/* 日历每天 */
.CalWeekendDay {line-height: 2;
}/* 日历今天 */
.CalTodayDay u,
.CalTodayDay {color: #fff !important;
}#blog-calendar u {color: var(--ThemeColor);font-weight: 600;text-decoration: none !important;
}.CalTodayDay {background-color: var(--ThemeColor);line-height: 2.15;border-radius: 50%;height: 34px !important;width: 34px !important;
}/* 搜索面板 */
.mySearch {background-color: var(--BlockColor);padding: 20px;border-radius: 4px;margin-bottom: 20px;
}/***** 搜索框 *****/
#sidebar_search_box .input_my_zzk {padding: 6px;outline: none;margin-left: 5px;background: var(--BackgroundColor);border: 1px solid var(--DividColor);border-radius: 4px;width: 145px;vertical-align: middle;height: 20px;
}input.btn_my_zzk {color: #fff;background-color: var(--ThemeColor);border-color: var(--ThemeColor);border: 1px;padding: 8px;border-radius: 2px;height: auto !important;
}input.btn_my_zzk:hover {outline: none;opacity: .7
}/******** 导航目录 *********/
.scroller-offset1 {text-indent: 0;overflow: hidden;text-overflow: ellipsis !important;
}.scroller-offset2 {text-indent: 1.5em;overflow: hidden;text-overflow: ellipsis !important;
}.scroller-offset3 {text-indent: 3em;overflow: hidden;text-overflow: ellipsis !important;
}.scroller-offset4 {text-indent: 4.5em;overflow: hidden;text-overflow: ellipsis !important;
}.scroller-offset5 {text-indent: 6em;overflow: hidden;text-overflow: ellipsis !important;
}.scroller-offset6 {text-indent: 7.5em;overflow: hidden;text-overflow: ellipsis !important;
}.nav .active {background-color: var(--BackgroundColor);border-radius: 2px;margin: 0 6px;
}.nav .active a {color: var(--ThemeColor);
}.nav {max-height: 400px;overflow-y: auto;/*padding:10px;*/overflow-x: hidden;white-space: nowrap;
}.nav li {padding: 2px 10px;
}.nav li a {text-overflow: ellipsis !important;width: 100px !important;white-space: nowrap;
}/* 常用链接 */
/* 最新随笔 */
/*我的标签 */
/* 积分排名 */
/* 随笔分类 档案分类 */
/* 最新评论 */
/* 阅读排行 */
/* 评论排行 */
/* 推荐排行 */
/* 目录 */
#sidebar_shortcut,
#sidebar_articlearchive,
#sidebar_imagecategory,
#sidebar_recentposts,
#sidebar_toptags,
#sidebar_scorerank,
#sidebar_postcategory,
.catList.sidebar-block,
#sidebar_postarchive,
#sidebar_recentcomments,
#sidebar_topviewedposts,
#sidebar_topcommentedposts,
#sidebar_topdiggedposts,
/*#sidebar_categories,*/
#sidebar_articlecategory,
#sidebar_scroller {background-color: var(--BlockColor);padding: 20px;border-radius: 4px;margin-bottom: 20px;
}#sidebar_shortcut ul li,
#sidebar_articlearchive ul li,
#sidebar_imagecategory ul li,
#sidebar_recentposts ul li,
#sidebar_toptags ul li,
#sidebar_scorerank ul li,
#sidebar_postcategory ul li,
#sidebar_postarchive ul li,
#sidebar_recentcomments ul li,
#sidebar_topviewedposts ul li,
#sidebar_topcommentedposts ul li,
#sidebar_topdiggedposts ul li,
.catList.sidebar-block ul li,
#sidebar_articlecategory ul li,
#sidebar_scroller ul li {list-style: none;line-height: 2;
}/**** 翻页 *****/#nav_next_page {margin-bottom: 20px;
}.topicListFooter {margin: 0px !important;
}.topicListFooter,
.pager {line-height: 3;overflow-x: auto;display: block !important;
}.topicListFooter a,
.Pager a {background-color: var(--BlockColor);padding: 6px 10px;display: inline-table;line-height: 1.5;color: var(--TextColor1);border: 1px solid var(--DividColor);border-radius: 4px;
}.topicListFooter a:hover,
.Pager a:hover {color: white;border: 1px solid var(--ThemeColor);background-color: var(--ThemeColor);
}.pager,
.Pager {font-size: 16px;color: var(--TextColor2);
}/* 我的随笔板块系列 */
#taglist_main {margin-top: 0 !important;
}/* 随笔简介图片 */
.filter_img {width: 100% !important;margin: 20px 0 0 0 !important;max-height: none !important;display: inline-block !important;max-width: none !important;border-radius: 4px !important;
}.PostListTitle,
#taglist_title {line-height: 2.4;font-size: var(--text1);color: var(--TextColor1);padding: 20px 0;border-radius: 4px;text-align: center;margin-bottom: 20px;
}#taglist {background-color: var(--BlockColor);padding: 20px;border-radius: 4px;margin: 20px 0;
}/* 我的随笔内容 */
#myposts {margin: 0 !important;
}.PostList {background-color: var(--BlockColor);padding: 20px;border-radius: 4px;margin: 20px 0 20px 0 !important;
}.PostList .postTitl2 {font-size: var(--text4);line-height: 2.4;color: var(--TextColor1);
}.postTitl2 a {padding-left: 10px;border-left: 4px solid var(--ThemeColor);
}.PostList .postDesc2 {color: var(--TextColor3);font-size: 14px !important;line-height: 3;
}.PostList .postText2 {color: var(--TextColor2);font-size: var(--text6) !important;line-height: 1.5;
}/*** 相册 ****/
.gallery {background-color: var(--BlockColor);padding: 20px;border-radius: 4px;margin-bottom: 20px;
}.gallery .thumbTitle {line-height: 2.4;width: 100%;font-size: var(--text1);color: var(--TextColor1);}.gallery img {max-width: 100%;
}.divPhoto {margin: 10px;
}.table-box {line-height: 2.4;font-size: var(--text1);color: var(--TextColor1);padding: 20px 0;border-radius: 4px;text-align: center;margin-bottom: 20px;
}/* 随笔档案 */
.entrylist {background-color: var(--BlockColor);padding: 20px;border-radius: 4px;margin-bottom: 20px;
}.entrylistItem {border-top: 1px solid var(--DividColor);margin-top: 10px;padding-top: 10px;
}.entrylistTitle {line-height: 2.4;width: 100%;font-size: var(--text1);color: var(--TextColor1);/*border-bottom: 1px solid var(--DividColor);*/
}.entrylistPosttitle {font-size: var(--text4);line-height: 2.4;color: var(--TextColor1);}.entrylistItemTitle {padding-left: 10px;border-left: 4px solid var(--ThemeColor);
}.entrylistPostSummary {color: var(--TextColor2);line-height: 1.5;
}.entrylistDescription {/*padding-bottom: 20px;*/
}.entrylistItemPostDesc {color: var(--TextColor3);font-size: 14px;line-height: 3;
}/* 搜索框 */
#widget_my_zzk,
#widget_my_google {display: flex;font-size: 16px !important;
}.input_my_zzk {flex: 1;float: left;
}.btn_my_zzk {/*width: 70px;*/
}/********** 博客正文 **********/
#topics {background-color: var(--BlockColor);padding: 20px;border-radius: 4px;margin-bottom: 20px;
}/* 博文标题 */
#cb_post_title_url {font-size: var(--text2);
}#topics .postTitle {border-bottom: 1px solid var(--DividColor);
}/* 博文底部功能按钮 */#blog_post_info {margin: 40px auto;
}#green_channel {border: none !important;width: 100%;display: none !important;margin: 20px 0 !important;
}#div_digg {float: none;margin: 0 auto;
}#author_profile {display: none;
}#green_channel a {background: url();font-size: 14px !important;text-shadow: none !important;
}#green_channel #green_channel_digg {color: white !important;background-color: var(--AidColor3) !important;border: 1px solid var(--AidColor3) !important;padding: 6px 10px;-webkit-border-radius: 4px;margin: 10px !important;-webkit-box-shadow: none !important;
}#green_channel #green_channel_follow {color: white !important;background-color: var(--AidColor2) !important;border: 1px solid var(--AidColor2) !important;padding: 6px 10px;-webkit-border-radius: 4px;margin: 10px !important;-webkit-box-shadow: none !important;
}#green_channel #green_channel_favorite {color: white !important;background-color: var(--AidColor1) !important;border: 1px solid var(--AidColor1) !important;padding: 6px 10px;margin: 10px !important;-webkit-border-radius: 4px;-webkit-box-shadow: none !important;
}#green_channel #green_channel_weibo {color: var(--TextColor1) !important;background-color: #fff !important;border: 1px solid #adadad !important;padding: 6px 10px;-webkit-border-radius: 4px;margin: 10px !important;-webkit-box-shadow: none !important;
}#green_channel #green_channel_weibo:hover {background-color: #e6e6e6 !important;
}#green_channel_weibo img {margin-left: 0 !important;
}#green_channel #green_channel_wechat {color: var(--TextColor1) !important;background-color: #fff !important;border: 1px solid #adadad !important;padding: 6px 10px;-webkit-border-radius: 4px;margin: 10px !important;-webkit-box-shadow: none !important;
}#green_channel #green_channel_wechat:hover {background-color: #e6e6e6 !important;
}#green_channel_wechat img {margin-left: 0 !important;
}/*** 博主信息 ***/
#author_profile_info .author_avatar {width: 60px;height: 60px;border-radius: 50%;margin-right: 20px;padding: 0 !important;
}/****** 上下文 *****/
#post_next_prev {border-top: 1px solid var(--DividColor);font-size: 14px;line-height: 1.8;padding-top: 20px;color: var(--TextColor1);
}/********** 去广告 **********/
#ad_c1,
#ad_c2,
#ad_t2,
.c_ad_block {display: none
}/********** 评论 **********/
/*头像*/
.body_right img {border: 1px solid var(--DividColor);
}/* 评论记录面板 */
#blog-comments-placeholder {background-color: var(--BlockColor);border-radius: 4px;margin-bottom: 20px;
}/*提交评论后*/
#divCommentShow {background-color: var(--BlockColor);border-radius: 4px;margin-bottom: 20px;
}.comment_my_posted {padding: 20px;
}.bq_post_comment {margin: 5px;font-style: normal;line-height: 2;border: none;color: var(--TextColor2);padding: 10px;
}/* 评论小人 */
#tbCommentAuthor {width: 100px;
}.blog_comment_body {word-wrap: break-word;overflow: hidden;background-color: var(--BackgroundColor);padding: 10px 20px;border-radius: 4px;
}/*评论引用 */
.comment_quote {padding: 5px 5px 5px 10px;border: 1px solid #ccc;color: #ccc;border-width: 0px 0px 0px 4px;
}legend {display: none;
}/* 评论列表标题 */
.feedback_area_title {font-size: var(--text6);color: var(--TextColor1);line-height: 2;background-image: none;border-bottom: 1px solid var(--DividColor);padding: 0;margin: 0 20px;font-weight: 700;
}/* 完整的评论块 */
.feedbackItem {margin: 0 20px;padding: 20px 0;border-bottom: 1px solid var(--DividColor);
}/* 删除修改评论 */
.feedbackManage {float: right;
}.blog_comment_body {line-height: 2;color: var(--TextColor2);margin: 10px 0;
}/* 评论刷新 */
#comment_nav {line-height: 3;padding-right: 20px;color: var(--TextColor1);
}/* 评论翻页 */
#comment_pager_bottom {padding: 20px;
}/* 评论面板 */
#comment_form_container {background-color: var(--BlockColor);padding: 20px;border-radius: 4px;margin-bottom: 20px;
}/* 评论标题 */
#commentform_title {font-size: var(--text6);color: var(--TextColor1);line-height: 2;background-image: none;border-bottom: 1px solid var(--DividColor);padding: 0;font-weight: 700;
}#comment_form_container p {line-height: 2;
}.commentbox_main {margin-top: 20px;
}.commentbox_title {width: 100%;
}/** 评论区打字框 */
#tbCommentBody {margin-top: 10px;width: 100% !important;height: 200px !important;border: 1px solid var(--DividColor);border-radius: 6px;padding: 5px;font-family: inherit;font-size: 14px;resize: none;box-sizing: border-box;background-color: transparent;color: var(--TextColor1);
}.commentform .comment_textarea:focus {outline: 0
}.commentform .comment_textarea:hover {border-color: var(--ThemeColor);
}/* 提交评论按钮 */
#btn_comment_submit {width: auto;height: auto;border-width: 0;cursor: pointer;color: #fff;background-color: var(--ThemeColor);border-color: var(--ThemeColor);user-select: none;padding: 5px 20px;font-size: 12px;border-radius: 5px;transition: color .2s linear, background-color .2s linear, border .2s linear, box-shadow .2s linear
}#btn_comment_submit:hover {opacity: .7
}/* 提示文字 */
#comment_form_container p:nth-of-type(3) {color: var(--TextColor2);
}/******** 相关博文 ************/
#under_post_news {background-color: var(--BlockColor);padding: 20px;border-radius: 4px;margin-bottom: 20px;
}#HistoryToday,
.recomm-block {max-width: 100%;
}.recomm-block b {font-size: var(--text6);color: var(--TextColor1);line-height: 2.4;padding: 0;}.recomm-block a {width: 100%;
}/********** 博客正文定制 **********/.post .postBody {line-height: 1.7;color: var(--TextColor1);
}.post .postBody h1 {font-size: 32px !important;margin-top: 24px !important;margin-bottom: 16px !important;border-bottom: 1px solid var(--DividColor);line-height: 1.25;padding-bottom: .3em
}.post .postBody h2 {font-size: 24px !important;border-bottom: 1px solid var(--DividColor);margin-top: 24px !important;margin-bottom: 16px !important;line-height: 1.25;padding-bottom: .3em
}.post .postBody h3 {font-size: 20px !important;margin-top: 24px !important;margin-bottom: 16px !important;line-height: 1.25;
}.post .postBody h4 {font-size: 16px !important;margin-top: 24px !important;margin-bottom: 16px !important;line-height: 1.25;
}.post .postBody h5 {font-size: 14px !important;margin-top: 24px !important;margin-bottom: 16px !important;line-height: 1.25;
}.post .postBody h6 {font-size: 13.6px !important;margin-top: 24px !important;margin-bottom: 16px !important;line-height: 1.25;
}.post .postBody p {margin: 17px auto
}.post .postBody blockquote {border: none;color: #6a737d;margin: 20px 0;padding: 0 0 0 10px;min-height: 20px;background: 0 0;border-left: 4px solid;/*#dfe2e5*/
}#cnblogs_post_body {margin: 20px 0;
}#cnblogs_post_body blockquote ul li {color: #6a737d !important;
}#cnblogs_post_body img {margin: 0 auto;
}.post .postBody em {padding-right: 3px
}.post .postBody strong {margin: 0 3px
}.post .postBody img {max-width: 100% !important;display: block;border-radius: 3px
}.post .postBody ol li,
.post .postBody ul li {margin: 3px 0;font-size: 15px;
}.post .postBody ol li p,
.post .postBody ul li p {margin: 0 !important
}#cnblogs_post_body table {display: table !important;
}.post .postBody table {font-size: 15px;border-collapse: collapse;border-spacing: 0;empty-cells: show;border: none !important;overflow: auto;width: 100%;word-break: keep-all !important;
}.post .postBody table th {font-family: inherit;font-size: inherit;background-color: var(--BackgroundColor) !important;white-space: nowrap;font-weight: 600;border: 1px solid var(--DividColor) !important;padding: 8px 16px !important
}.post .postBody table tr:nth-child(2n) {background-color: var(--BackgroundColor) !important;
}.post .postBody table tr {background-color: var(--BlockColor) !important;
}.post .postBody table td {border: 1px solid var(--DividColor) !important;padding: 8px 16px !important;
}.post .postBody h1 code,
.post .postBody h2 code,
.post .postBody h3 code,
.post .postBody h4 code,
.post .postBody h5 code,
.post .postBody h6 code,
.post .postBody li code,
.post .postBody p code,
.post .postBody table code {color: #c7254e;line-height: 1;font-family: consolas !important;vertical-align: middle;margin: 0 3px;background: var(--BackgroundColor) !important;font-size: 14px !important;padding: .2em .3em !important;border-radius: 3px !important;border: 1px solid var(--DividColor) !important
}.post .postBody #BlogPostCategory a {margin-left: 5px
}.post .postBody #post_next_prev {font-size: 16px;margin-top: 20px;padding-top: 20px;
}.post .postBody hr {background-color: var(--DividColor);border: 0;height: .25em;margin: 24px 0;padding: 0;
}#cnblogs_post_body ul ul li {list-style-type: circle;
}#cnblogs_post_body ul ul ul li {list-style-type: square !important;
}.post .postBody ul ul ul {list-style-type: square !important;
}.post .postBody ul ul {list-style-type: circle !important;
}.post .postBody ul {list-style-type: disc !important;
}.cnblogs_code {background-color: #f2f4f5;padding-left: 1em;padding-right: 1em;border: none !important;border-radius: 3px !important;font-family: Lucida Console, Consolas, Monaco, Andale Mono, Ubuntu Mono, monospace !important
}.cnblogs_code div {background-color: transparent;color: #656c73
}.cnblogs_code img {margin: 0 !important
}.cnblogs_code pre {color: #656c73;font-family: inherit !important
}.cnblogs_code pre span {font-family: inherit !important;color: inherit !important
}.cnblogs_code textarea {font-family: inherit !important;padding: 5px;border: 1px solid #3e4c42;color: #c5d4ef;background-color: #282c34
}.cnblogs_code textarea:focus {outline: 0
}.cnblogs_code .code_img_closed,
.cnblogs_code .code_img_opened {display: none !important
}.cnblogs_code .cnblogs_code_toolbar {width: 20px
}.cnblogs_code .cnblogs_code_toolbar span {padding-right: 0
}.cnblogs_code .cnblogs_code_toolbar a:link img {background-color: transparent !important
}.cnblogs_code .cnblogs_code_collapse {color: #656c73;border: 1px solid #989fa6;border-radius: 2px;background-color: transparent;display: inline-block;cursor: pointer;padding: 5px 5px 2px 5px
}/* markdown 键盘关键字 */
kbd {margin: 0 .1em;padding: .1em .6em;font-size: .8em;color: #242729;background: #fff;border: 1px solid #adb3b9;border-radius: 3px;box-shadow: 0 1px 0 rgba(12, 13, 14, .2), 0 0 0 2px #FFF inset;white-space: nowrap;vertical-align: middle;
}/********** 代码语法高亮 **********/
/***** MATLAB语法高亮方案 *****/
.matlab .hljs-keyword {color: #0000fe;
}.matlab .hljs-string {color: #a020ef;
}.matlab .hljs-comment {color: #228b22;
}.matlab .hljs-built_in,
.matlab .hljs-function,
.matlab .hljs-title {color: var(--TextColor1);
}/*********** 其他代码语法高亮 **********/
.cnblogs-markdown .hljs,
.cnblogs-markdown .matlab-code,
.cnblogs_Highlighter pre {display: block;color: var(--TextColor1);border-radius: 4px;overflow-x: auto;background: var(--BackgroundColor) !important;border: none !important;font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif !important;padding: 1em !important;font-size: 14px !important
}.cnblogs-markdown pre {white-space: pre;
}.hljs-comment,
.hljs-meta {color: #969896
}.hljs-emphasis,
.hljs-quote,
.hljs-string,
.hljs-strong,
.hljs-template-variable,
.hljs-variable {color: #df5000
}.hljs-keyword,
.hljs-selector-tag,
.hljs-type {color: #a71d5d
}.hljs-attribute,
.hljs-bullet,
.hljs-literal,
.hljs-symbol {color: #0086b3
}.hljs-name,
.hljs-section {color: #63a35c
}.hljs-tag {color: var(--TextColor1);
}.hljs-attr,
.hljs-selector-attr,
.hljs-selector-class,
.hljs-selector-id,
.hljs-selector-pseudo,
.hljs-title {color: #795da3
}.hljs-addition {color: #55a532;background-color: #eaffea
}.hljs-deletion {color: #bd2c00;background-color: #ffecec
}.hljs-link {text-decoration: underline
}/***********************************************************/
/********** 自定义matlab语法高亮 **********/
.matlab-code {white-space: pre;
}.matlab-code .matlab-keyword,
code .matlab-keyword {color: #0000fe;
}.matlab-code .matlab-string,
code .matlab-string {color: #a020ef;
}.matlab-code .matlab-number,
code .matlab-number {color: var(--TextColor1);
}.matlab-code .matlab-bracket,
code .matlab-bracket {color: var(--TextColor1);
}.matlab-code .matlab-comment,
code .matlab-comment {color: #228b22;
}.matlab-code .matlab-comment span,
code .matlab-comment span {color: #228b22;font-weight: normal;
}/* 插入媒体 */
#cnblogs_post_body .video {height: 0;margin: 10px auto;padding-bottom: 56.25%;/* 16:9 */position: relative;width: 100%;display: flex;justify-content: center;align-items: center;
}#cnblogs_post_body .video iframe,
#cnblogs_post_body .video video {position: absolute;/*left: 0;*/top: 0;/*right:0;*/width: 98%;height: 100%;z-index: 0;
}#cnblogs_post_body .music {height: 140px;/*padding-bottom: 14.39%;*//* 16:9 */position: relative;width: 100%;
}#cnblogs_post_body .music iframe {position: absolute;left: 0;top: 0;width: 100%;height: 100%;
}/* 解析视频 */
.__zy_bounce __zy_animated __zy_infinite {display: none;
}.div-box {display: flex;height: 40px;line-height: 40px;background: #fff;text-align: center;width: 100%;margin-top: 20px;
}.input-url {flex: 1;padding: 10px;outline: none;margin-left: 5px;background: #fff;border: 1px solid #b6b6b6;border-radius: 4px;
}.jiexi {/*width: 100px;*/background: #3385ff;border: 1px solid #3385ff;padding: 10px 20px;border-radius: 4px;margin: 0 4px 0 10px;height: 40px;outline: none;color: #fff;
}.jiexi:hover {background-color: #2a6bcc;
}/* 悬浮式下拉菜单 */
.dropdown {position: relative;display: inline-block;
}.dropdown-content {display: none;z-index: 9999;margin-left: 10px;position: absolute;background-color: #f9f9f9;width: 100px;border-radius: 4px;box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
}.dropdown:hover .dropdown-content {display: block;
}.dropdown-content p {color: black;display: block;cursor: pointer;
}.dropdown-content p:hover {background-color: #f1f1f1
}/********** 首页轮播 **********/
#slideContainer {display: block;
}#slideContainer img {max-width: 100% !important;
}.cl:after {content: ".";display: block;height: 0;clear: both;visibility: hidden;
}.cl {zoom: 1;
}.frame {margin-bottom: 10px;border: 1px solid #e1e1e1;background: #FFF;
}.title {padding: 0 10px;height: 32px;font-size: 14px;font-weight: 700;line-height: 32px;overflow: hidden;
}.block {margin: 10px 10px 0;
}.temp {margin: 1px;
}.slideshow {clear: both;
}.slideshow li {position: relative;overflow: hidden;
}.slideshow span.title {position: absolute;bottom: 0;left: 0;margin-bottom: 0;width: 100%;height: auto;line-height: 32px;font-size: 16px;text-indent: 10px;
}.slideshow span.title,
.slidebar li {background: rgba(0, 0, 0, 0.3);filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#30000000, endColorstr=#30000000);color: #FFF;overflow: hidden;
}.slidebar li {float: left;margin-right: 1px;width: 20px;height: 20px;line-height: 20px;text-align: center;font-size: 10px;cursor: pointer;
}.slidebar li.on {background: rgba(255, 255, 255, 0.5);filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#50FFFFFF, endColorstr=#50FFFFFF);color: #000;font-weight: 700;
}.frame {background: none;border: 0px solid #fff;margin-bottom: 0px;
}.temp {margin: 0;
}.slidebar {position: absolute;top: 5px;left: 4px;
}.slideshow span.title,
.slidebar li {background: rgba(0, 0, 0, 0.3);filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#90000000, endColorstr=#90000000);color: #FFF;overflow: hidden;
}.slidebar li.on {background: rgba(255, 255, 255, 0.5);filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#90000000, endColorstr=#90000000);color: #b62525;font-weight: 700;
}.slideshow SPAN.title {text-indent: 0px;
}.block {margin: 0;position: relative;
}#frameHlicAe {margin: 0px !important;border: 0px !important;
}.comiis_wrap960,
.comiis_wrapad {margin: 0 auto;background-color: var(--BlockColor);border-radius: 2px;
}.comiis_wrapad {padding: 20px;margin-bottom: 20px;
}.comiis_wrapad {overflow: hidden;
}.comiis_wrapad img {float: left;margin-top: 0px;width: 100%;
}#slidesImgs li {width: 100%;height: auto;display: none;
}#site_nav_under {display: none;
}
.c_ad_block, .ad_text_commentbox {display: none;margin: 0;padding: 0;
}
#ad_under_google {height: 0;overflow: hidden;
}
#ad_under_google a {display: none;
}
#ad_t2{ display:none }#div_digg{ display:none }
#author_profile_info{ display:none }
.postDesc{ display:none }#cnblogs_post_body .video{height: 0;padding-bottom: 56.25%;  /* 16:9 */position: relative;width: 100%;
}#cnblogs_post_body .video iframe{
position: absolute;left: 0;top: 0;width: 100%;height: 100%;
}
/*
#blog_nav_admin{display:none
}*/

博客侧边栏公告

<script>
url1 = location.href;
self.location.replace(url);
</script><script type="text/javascript">// 设置公告//var news ='' ;// 设置博客信息var myprofile = [{blogName: "Hacker-TJBK",blogAvatar: "https://blog-static.cnblogs.com/files/blogs/746240/TJBK.ico?t=1649246564",blogSign: "Hello World!\nHello Programming!",blogFollow: "follow('30807ee3-3273-4cff-72df-08d619358b99')",QQ: "548343523",Github: "https://github.com/GShang2018",WeChat: "https://img2018.cnblogs.com/blog/1489774/201910/1489774-20191015183429352-318054137.jpg"}];/* 设置首页轮播var mybanner = [{url: "https://www.cnblogs.com/gshang/p/11107946.html",img: "https://www.kanjiantu.com/images/2019/07/05/post4242f1ce89576c2f3.png",title: "动画电影分享"},{url: "https://www.cnblogs.com/gshang/p/11185613.html",img: "https://img2018.cnblogs.com/blog/1489774/201909/1489774-20190923190114426-2061049622.png",title: "VIP视频解析"},{url: "https://www.cnblogs.com/gshang/p/11135154.html",img: "https://www.kanjiantu.com/images/2019/07/05/post2b40b83305f79d463.png",title: "常用网站集合"},{url: "https://www.cnblogs.com/gshang/p/10746751.html",img: "https://www.kanjiantu.com/images/2019/07/05/post169393a677253c679.png",title: "实用工具分享"}];*/// 设置导航栏扩展var mynav = [{id: "blog_nav_cnblogs",url: "https://home.cnblogs.com",title: "动态"},/*{id: "blog_nav_maintain",url: "https://www.cnblogs.com/gshang/p/11149316.html",title: "维护"},{id: "blog_nav_frieds",url: "https://www.cnblogs.com/gshang/p/11149804.html",title: "友链"},*/{id: "blog_nav_theme",url: "javascript:changeTheme()",title: "切换主题",//trurl()},{id: "blog_nav_shortcut",url: "javascript:narrow()",title: "休息一会"},{id:"blog_nav_GitHub",url:"https://GitHub.com/",title:"GitHub"}];function reurl(){url = location.href; //把当前页面的地址赋给变量 urlvar times = url.split("?"); //分切变量 url 分隔符号为 "?"if(times[1] != 1){ //如果?后的值不等于1表示没有刷新url += "?1"; //把变量 url 的值加入 ?1self.location.replace(url); //刷新页面}}οnlοad=reurlsetFavio(myprofile); // 网页tab图像loadThemeColor(); //导入主题颜色setHeader(); //导航栏extendNav(mynav); // 导航栏扩展
//  loadNewsinfo(news);//导入公告
//  loadBanner(mybanner); //首页轮播loadProfile(myprofile); // 公告栏个人信息changePublishinfo(); //博文发布信息位置setPostSideBar(); //侧边栏目录setSignautre(myprofile); //博文签名loadMobileContent(); //移动端目录功能栏commentIcon(); //评论区头像blankTarget(); //文章链接新窗口打开copyCode(); //代码块复制setMobileHeader(); //移动端导航栏tableScorll(); //表格滚动mymd(); //自定义语法runCode(); //文章内部运行代码highlightMATLABCode(); //matlab自定义语法高亮
</script><Script>
function reurl(){url = location.href; //把当前页面的地址赋给变量 urlvar times = url.split("?"); //分切变量 url 分隔符号为 "?"if(times[1] != 1){ //如果?后的值不等于1表示没有刷新url += "?1"; //把变量 url 的值加入 ?1self.location.replace(url); //刷新页面}
}
οnlοad=reurl
</script>

页首HTML代码

<!--符号图标-->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css"><script>// 设置捷径var myHtml ='<h3>古诗积累</h3>' +'<div class="poem"><p id="poem_sentence"></p><p id="poem_info"></p></div>' +'<h3>激情音乐</h3>' +'<embed frameborder="no" border="0" marginwidth="0" marginheight="0" width=100% height=auto src="//music.163.com/outchain/player?type=0&id=7369132950&auto=0&height=auto"></embed>'+'<h3>免费影院</h3>' +//'<a href="http://www.baidu.com"><button type="button">百度一下</button></a>';*/'<div class="video"><iframe src="//player.bilibili.com/player.html?aid=54874176&cid=95969626&page=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"> </iframe></div>';loadShortcut(myHtml); //导入捷径
</script>
<script type="text/javascript">jinrishici.load(function(result) {var sentence = document.querySelector("#poem_sentence");var info = document.querySelector("#poem_info");sentence.innerHTML = result.data.content;info.innerHTML = '——【' + result.data.origin.dynasty + '】' + result.data.origin.author + '《' + result.data.origin.title + '》';});
</script>

页脚HTML代码

<!--念两句诗-->
<script src="https://sdk.jinrishici.com/v2/browser/jinrishici.js" charset="utf-8"></script>
<!--代码复制-->
<script src="https://cdn.bootcss.com/clipboard.js/2.0.4/clipboard.min.js"></script><!--主题-->
<script src="https://blog-static.cnblogs.com/files/blogs/746240/TJBK2022.4.9.js?t=1649448842"></script><script>$("#favicon").replaceWith('<link rel="shortcut icon" href="https://blog-static.cnblogs.com/files/blogs/746240/TJBK.ico?t=1649246525">');
</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>
--><script src="https://blog-static.cnblogs.com/files/zhonglinke/jquery-1.7.1.min.js"></script>
<script src="https://files.cnblogs.com/files/zhonglinke/jquery.snow.js"></script><Script>
function reurl(){url = location.href; //把当前页面的地址赋给变量 urlvar times = url.split("?"); //分切变量 url 分隔符号为 "?"if(times[1] != 1){ //如果?后的值不等于1表示没有刷新url += "?1"; //把变量 url 的值加入 ?1self.location.replace(url); //刷新页面}
}
οnlοad=reurl
</script>

涉及其它代码

2022.4.9.js:

// 侧边导航目录
jQuery(function($) {$(document).ready(function() {var contentButton = [];var contentTop = [];var content = [];var lastScrollTop = 0;var scrollDir = '';var itemClass = '';var itemHover = '';var menuSize = null;var stickyHeight = 0;var stickyMarginB = 0;var currentMarginT = 0;var topMargin = 0;var vartop = 0;$(window).scroll(function(event) {var st = $(this).scrollTop();if (st > lastScrollTop) {scrollDir = 'down';} else {scrollDir = 'up';}lastScrollTop = st;});$.fn.stickUp = function(options) {$(this).addClass('stuckMenu');var objn = 0;if (options != null) {for (var o in options.parts) {if (options.parts.hasOwnProperty(o)) {content[objn] = options.parts[objn];objn++;}}if (objn == 0) {console.log('error:needs arguments');}itemClass = options.itemClass;itemHover = options.itemHover;if (options.topMargin != null) {if (options.topMargin == 'auto') {topMargin = parseInt($('.stuckMenu').css('margin-top')) + 70;} else {if (isNaN(options.topMargin) && options.topMargin.search("px") > 0) {topMargin = parseInt(options.topMargin.replace("px", ""));} else if (!isNaN(parseInt(options.topMargin))) {topMargin = parseInt(options.topMargin);} else {console.log("incorrect argument, ignored.");topMargin = 0;}}} else {topMargin = 0;}menuSize = $('.' + itemClass).size();}stickyHeight = parseInt($(this).height());stickyMarginB = parseInt($(this).css('margin-bottom'));currentMarginT = parseInt($(this).next().closest('div').css('margin-top'));vartop = parseInt($(this).offset().top);};$(document).on('scroll', function() {varscroll = parseInt($(document).scrollTop());if (menuSize != null) {for (var i = 0; i < menuSize; i++) {contentTop[i] = $('#' + content[i] + '').offset().top;function bottomView(i) {contentView = $('#' + content[i] + '').height() * .4;testView = contentTop[i] - contentView;if (varscroll > testView) {$('.' + itemClass).removeClass(itemHover);$('.' + itemClass + ':eq(' + i + ')').addClass(itemHover);} else if (varscroll < 50) {$('.' + itemClass).removeClass(itemHover);$('.' + itemClass + ':eq(0)').addClass(itemHover);}}if (scrollDir == 'down' && varscroll > contentTop[i] - 50 && varscroll < contentTop[i] + 50) {$('.' + itemClass).removeClass(itemHover);$('.' + itemClass + ':eq(' + i + ')').addClass(itemHover);}if (scrollDir == 'up') {bottomView(i);}}}if (vartop < varscroll + topMargin) {$('.stuckMenu').addClass('isStuck');$('.stuckMenu').next().closest('div').css({'margin-top': stickyHeight + stickyMarginB + currentMarginT + 'px'}, 10);$('.stuckMenu').css("position", "fixed");$('.isStuck').css({top: '0px'}, 10, function() {});} else {$('.stuckMenu').removeClass('isStuck');$('.stuckMenu').next().closest('div').css({'margin-top': currentMarginT + 'px'}, 10);$('.stuckMenu').css("position", "relative");};});});
});function loadScroller() {if ($("#topics").length > 0) {$('#sideBarMain').remove();//先获取第一个h标签, 之后循环时作为上一个h标签var $ph = $('#cnblogs_post_body :header:eq(0)');if ($ph.length > 0) {//设置层级为1$ph.attr('offset', '1');//添加导航目录的内容$('#sideBar').append('<div id="sidebar_scroller" class="catListPostArchive sidebar-block"><h3 class="catListTitle">导航目录</h3><ul class="nav"></ul></div>');//取当前边栏的宽度$('#sidebar_scroller').css('width', ($('#sideBar').width() - 40) + 'px');//让导航目录停留在页面顶端$('#sidebar_scroller').stickUp();//遍历文章里每个h标签$('#cnblogs_post_body :header').each(function(i) {var $h = $(this);//设置h标签的id, 编号从0开始$h.attr('id', 'scroller-' + i);//比上一个h标签层级小, 级数加1if ($h[0].tagName > $ph[0].tagName) {$h.attr('offset', parseInt($ph.attr('offset')) + 1);} //比上一个h标签层级大, 级数减1else if ($h[0].tagName < $ph[0].tagName) {var h = parseInt($h[0].tagName.substring(1));var ph = parseInt($ph[0].tagName.substring(1));var offset = parseInt($ph.attr('offset')) - (ph - h);if (offset < 1) {offset = 1};$h.attr('offset', offset);} //和上一个h标签层级相等时, 级数不变else {$h.attr('offset', $ph.attr('offset'));}//添加h标签的目录内容$('#sidebar_scroller ul').append('<li class="scroller-offset' + $h.attr('offset') + '"><a href="#scroller-' +i +'">' + $h.text() + '</a></li>');//最后设置自己为上一个h标签$ph = $h;});//开启滚动监听, 监听所有在.nav类下的li$('body').scrollspy();}}
}function setPostSideBar() {setTimeout(function() {loadScroller();}, 20);
}// 设置博文内部表格滚动
function tableScorll() {if ($("#topics") != null) {$("table").each(function() {$(this).wrapAll('<div class="tablebox"></div>')$(".tablebox").css('overflow', 'auto');});}
};// 设置手机端导航栏样式
function setMobileHeader() {var w = document.body.clientWidth;if (w <= 361) {$('#navList').css('display', 'none');$('#header').append('<div class="dropdown">' +' <span><i class="fa fa-bars fa-lg"></i></span>' +' <div class="dropdown-content">' +$("#navList").html() +'  </div>' +'</div>')}
}// 博文内部代码块复制
function copyCode() {if ($("#topics") != null) {for (i = 0; i <= $('pre').length; i++) {$('pre').eq(i).before('<div class="clipboard-button" id="copy_btn_' + i + ' " data-clipboard-target="#copy_target_' +i + '"title="复制代码">复制代码</div>');$('pre').eq(i).attr('id', 'copy_target_' + i);}$('.clipboard-button').css({"padding": "4px","border-radius": "2px","text-align": "right","user-select": " none"})var clipboard = new ClipboardJS('.clipboard-button');clipboard.on('success', function(e) {e.trigger.innerHTML = '复制成功!';setTimeout(function() {e.trigger.innerHTML = '复制代码';}, 2 * 1000);e.clearSelection();});clipboard.on('error', function(e) {e.trigger.innerHTML = '复制失败!';setTimeout(function() {e.trigger.innerHTML = '复制代码';}, 2 * 1000);e.clearSelection();});}
};// 设置博文内部链接新窗口打开
function blankTarget() {if ($("#topics") != null) {$('#cnblogs_post_body a[href^="http"]').each(function() {$(this).attr('target', '_blank');});}
}// 视频解析
function jiexi1() {var url = document.getElementById("url").value;document.getElementById("iframe_jiexi").src = "https://api.sigujx.com/?url=" + url;
}function jiexi2() {var url = document.getElementById("url").value;document.getElementById("iframe_jiexi").src = "https://jx.lache.me/cc/?url=" + url;
}function jiexi3() {var url = document.getElementById("url").value;document.getElementById("iframe_jiexi").src = "https://jx.618g.com/?url=" + url;
}// 修改博文发布信息位置
function changePublishinfo() {if ($("#topics") != null) {$(function() {//延迟1秒加载, 等博客园的侧栏加载完毕, 不然导航目录距离顶部的高度会不对setTimeout(function() {$(".postDesc").insertBefore($("#cnblogs_post_body"));$("#BlogPostCategory").insertBefore($("#cnblogs_post_body"));$("#EntryTag").insertBefore($("#cnblogs_post_body"));}, 100);})};
};// 设置评论区头像
function commentIcon() {if ($(".blog_comment_body").length) {addImage();} else {var intervalId = setInterval(function() {if ($('.blog_comment_body').length) { //如果存在了clearInterval(intervalId); // 则关闭定时器commentIcon(); //执行自身}}, 100);}
}function addImage() {var spen_html = "<span class='bot' ></span>\<span class='top'></span>";$(".blog_comment_body").append(spen_html);$(".blog_comment_body").before("<div class='body_right' style='float: left; margin-right:20px;'><a target='_blank'><img  style='border-radius:50%;'/></a></div>");var feedbackCon = $(".feedbackCon").addClass("clearfix");for (var i = 0; i < feedbackCon.length; i++) {var span = $(feedbackCon[i]).find("span:last")[0].innerHTML || "http://pic.cnitblog.com/face/sample_face.gif";$(feedbackCon[i]).find(".body_right img").attr("src", span);var href = $(feedbackCon[i]).parent().find(".comment_date").next().attr("href");$(feedbackCon[i]).find(".body_right a").attr("href", href);}
}// 设置手机端目录功能栏
function loadMobileContent() {var w = document.body.clientWidth;if ((w <= 361) && ($('#sidebar_scroller') != null)) {$('#cnblogs_post_body').append('<div class="mytoolbar"><ul id="toolbtn"><li><a href="#top"><i class="fa fa-angle-up" aria-hidden="true"></i>返回顶部</a></li><li onclick="showContent()"><i class="fa fa-bars" aria-hidden="true"></i>目录</li><li><a href="#footer"><i class="fa fa-angle-down" aria-hidden="true"></i>返回底部</a></li></ul></div>');}
}function showContent() {if ($('#sidebar_scroller').css('display') == 'none') {$('#sidebar_scroller').css('display', 'block');} else {$('#sidebar_scroller').css('display', 'none');}
}// 设置顶部导航栏
function setHeader() {$("#header").each(function() {$(this).wrapAll('<div class="headbox"></div>')$(".headbox").css({"width": "100%","height": "50px","line-height": "50px","background-color": "var(--BlockColor)",});});
}// 导航栏扩展
function extendNav(mynav) {var str = '';for (var i = 0; i < mynav.length; i++) {str = str + '<li><a id="' + mynav[i].id + '" class="menu" href="' + mynav[i].url + '">' + mynav[i].title +'</a></li>';}$('#navList').append(str);
}// 设置首页轮播
function loadBanner(mybanner) {var str1 = '',str2 = '',str = '';for (var i = 0; i < mybanner.length; i++) {str1 = str1 + '<li>' + '<a href="' + mybanner[i].url + 'target=" _blank">' +'<img src="' + mybanner[i].img + '" alt="" />' +'</a>' +'<span class="title">' + mybanner[i].title + '</span>' +'</li>';}for (var i = 2; i <= mybanner.length; i++) {str2 = str2 + '<li>' + i + '</li>';}str = '<div class="comiis_wrapad" id="slideContainer">' +'<div id="frameHlicAe" class="frame cl">' +'<div class="temp"></div>' +'<div class="block">' +'<div class="cl">' +'<ul class="slideshow" id="slidesImgs">' +str1 +'</ul>' +'</div>' +'<div class="slidebar" id="slideBar">' +'<ul>' +'<li class="on">1</li>' +str2 +'</ul>' +'</div>' +'</div>' +'</div>' +'</div>';if ($('.day').length > 0) {$('.forFlow').prepend($(str)) //首页轮播}function SlideShow(c) {var a = document.getElementById("slideContainer"),f = document.getElementById("slidesImgs").getElementsByTagName("li"),h = document.getElementById("slideBar"),n = h.getElementsByTagName("li"),d = f.length,c = c || 3000,e = lastI = 0,j, m;function b() {m = setInterval(function() {e = e + 1 >= d ? e + 1 - d : e + 1;g()}, c)}function k() {clearInterval(m)}function g() {f[lastI].style.display = "none";n[lastI].className = "";f[e].style.display = "block";n[e].className = "on";lastI = e}f[e].style.display = "block";a.onmouseover = k;a.onmouseout = b;h.onmouseover = function(i) {j = i ? i.target : window.event.srcElement;if (j.nodeName === "LI") {e = parseInt(j.innerHTML, 10) - 1;g()}};b()};if ($('.day').length > 0) {SlideShow(3000);}}
// 设置网页tab图标
function setFavio(myprofile) {$('head').append($('<link rel="shortcut icon" type="image/x-icon"/>').attr('href', myprofile[0].blogAvatar));
};// 设置侧边栏公告个人信息
function loadProfile(myprofile) {var str = '<div class="myprofile">' +'<div class="myprofile-top">' +'<a class="avatar" href="https://home.cnblogs.com/u/' + myprofile[0].blogName + '/ ">' +'<img src="' + myprofile[0].blogAvatar + '" alt="240">' +'</a>' +'<div class="profile-info"><a class="nickname" href=" https://home.cnblogs.com/u/' + myprofile[0].blogName + '/">' +'</a>' +'<p id="mywords"></p>' +'</div>' +'</div>' +'<div class="myprofile-bottom">' +'<ul>' +'<li><a href="https://home.cnblogs.com/u/' + myprofile[0].blogName + '/" id="myyear">' +'</a>' +'</li>' +'<li><a href="https://home.cnblogs.com/u/' + myprofile[0].blogName + '/followers/" id="myfollower">' +'</a>' +'</li>' +'<li><a href="https://home.cnblogs.com/u/' + myprofile[0].blogName + '/followees/" id="myfollowee">' +'</a>' +'</li>' +'</ul>' +'</div>' +'<div class="myprofile-bottom">' +'<ul>' +'<li id="mypost">' +'</li>' +'<li id="myarticle">' +'</li>' +'<li id="mycomment">' +'</li>' +'</ul>' +'</div>' +'</div>';if ($('#blog-news') != null) {$('#blog-news').append(str);$("#profile_block a").each(function(idx) {if (idx == 1) {$('#myyear').html('园龄<br>' + /*$(this).context.innerText*/10+'年');}if (idx == 2) {$('#myfollower').html('粉丝<br>' + $(this).context.innerText);}if (idx == 3) {$('#myfollowee').html('关注<br>' + $(this).context.innerText);}});$('#profile_block').css('display', 'none');$('#mywords').html(myprofile[0].blogSign);$('#mypost').html($('#stats_post_count').text().replace(/\-/g, "<br>"));$('#myarticle').html($('#stats_article_count').text().replace(/\-/g, "<br>"));$('#mycomment').html($('#stats-comment_count').text().replace(/\-/g, "<br>"));$('.myprofile').append($('#p_b_follow'));$('.nickname').html($('#Header1_HeaderTitle').text());}
}// 设置博文底部个性签名
function setSignautre(myprofile) {var str = '<h2>作者信息</h2>' +'<div id="card">' +'<div id="proBody">' +'<center>' +'<img src="' + myprofile[0].blogAvatar + '">' +'<p class="name">' + myprofile[0].blogName + '</p>' +'<p class="sign">' + myprofile[0].blogSign + '</p>' +'<input type="button" class="contact" value="关注" onclick="' + myprofile[0].blogFollow + ';">' +'</center>' +'</div>' +'<div id="proFooter">' +'<ul>' +'    <li>' +'<a href="http://sighttp.qq.com/msgrd?v=1&amp;uin=' + myprofile[0].QQ + '" target="_blank">' +'<i class="fa fa-qq" style="font-size: 1.7rem"></i> &nbsp;&nbsp;&nbsp;&nbsp;Q&nbsp;Q' +'&nbsp;&nbsp;&nbsp;&nbsp;' +'</a>' +'</li>' +'<li>' +'<a href="' + myprofile[0].Github + '" target="_blank">' +'<i class="fa fa-github fa-2x"></i>' +'Github' +'</a>' +'</li>' +'<li>' +'<a href="' + myprofile[0].WeChat + '" target="_blank">' +'<i class="fa fa-weixin fa-2x"></i>' +'WeChat' +'</a>' +'</li>' +'</ul>' +'</div>' +'</div>';if ($('#cnblogs_post_body') != null) {$('#MySignature').append(str);}}//运行脚本
function runCode() {$(function() {$('myscript').each(function() {$(this).css('display', 'none');eval($(this).text());});});
}// 新增/读取 cookie
function setCookie(cname, cvalue, exdays) {var d = new Date();d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));var expires = "expires=" + d.toGMTString();document.cookie = cname + "=" + cvalue + "; " + expires + ";secure; path=/";
}function getCookie(cname) {var name = cname + "=";var ca = document.cookie.split(';');for (var i = 0; i < ca.length; i++) {var c = ca[i].trim();if (c.indexOf(name) == 0) {return c.substring(name.length, c.length);}}return "";
}var Theme = {Light: {'color': '#141418','TextColor1': '#141418','TextColor2': '#5f5f6b','TextColor3': '#97979f','DividColor': '#e7eaf0','BackgroundColor': '#f4f6fa','BlockColor': '#ffffff'},Dark: {'color': '#cfcecf','TextColor1': '#cfcecf','TextColor2': '#89888c','TextColor3': '#57565a','DividColor': '#323236','BackgroundColor': '#26252a','BlockColor': '#201f25'}
}function changeThemeColor(Light) {setCookie('color', Light.color, 30);setCookie('TextColor1', Light.TextColor1, 30);setCookie('TextColor2', Light.TextColor2, 30);setCookie('TextColor3', Light.TextColor3, 30);setCookie('DividColor', Light.DividColor, 30);setCookie('BackgroundColor', Light.BackgroundColor, 30);setCookie('BlockColor', Light.BlockColor, 30);$('html').css("color", getCookie("color"));document.documentElement.style.setProperty("--TextColor1", getCookie("TextColor1"));document.documentElement.style.setProperty("--TextColor2", getCookie("TextColor2"));document.documentElement.style.setProperty("--TextColor3", getCookie("TextColor3"));document.documentElement.style.setProperty("--DividColor", getCookie("DividColor"));document.documentElement.style.setProperty("--BackgroundColor", getCookie("BackgroundColor"));document.documentElement.style.setProperty("--BlockColor", getCookie("BlockColor"));
}// 切换主题
function changeTheme() {if ($('html').css('color') == 'rgb(20, 20, 24)') {changeThemeColor(Theme.Dark);url = location.href;self.location.replace(url);} else {changeThemeColor(Theme.Light);url = location.href;self.location.replace(url);}
}function loadThemeColor() {if (getCookie("color")==""){$('html').css("color", getCookie("#141418"));document.documentElement.style.setProperty("--TextColor1", "#141418");document.documentElement.style.setProperty("--TextColor2", "#5f5f6b");document.documentElement.style.setProperty("--TextColor3", "#97979f");document.documentElement.style.setProperty("--DividColor", "#e7eaf0");document.documentElement.style.setProperty("--BackgroundColor", "#f4f6fa");document.documentElement.style.setProperty("--BlockColor", "#ffffff");}else{$('html').css("color", getCookie("color"));document.documentElement.style.setProperty("--TextColor1", getCookie("TextColor1"));document.documentElement.style.setProperty("--TextColor2", getCookie("TextColor2"));document.documentElement.style.setProperty("--TextColor3", getCookie("TextColor3"));document.documentElement.style.setProperty("--DividColor", getCookie("DividColor"));document.documentElement.style.setProperty("--BackgroundColor", getCookie("BackgroundColor"));document.documentElement.style.setProperty("--BlockColor", getCookie("BlockColor"));}
}// 公告
function loadNewsinfo(news){str = '<div class="infocard normal"><p> <i class="fa fa-volume-up fa-2x" aria-hidden="true"></i>'+ news +' </p></div>'$('#mainContent').prepend(str);
}// 捷径
function narrow() {var nowText = $('#blog_nav_shortcut').text();if (nowText == '休息一会') {$('.shortcut').css({'height': 'auto','padding': '20px','margin-bottom': '20px'});$('#blog_nav_shortcut').text('继续学习')} else {$('.shortcut').css({'height': '0','padding': '0px','margin-bottom': '0px'});$('#blog_nav_shortcut').text('休息一会')}return false;
}function loadShortcut(myHtml) {var str = '<div class="shortcut" style="height:0">' + myHtml + '</div>';$('#mainContent').prepend(str);
}/*
MATLAB Highlighter 1.55, a small and lightweight JavaScript library for colorizing your MATLAB syntax.
http://matlabtricks.com/matlab-highlighter
Licensed under the MIT license
Copyright (c) 2013, Zoltan Fegyver
*/
function highlightMATLABCode(d) {function g(i) {return (i >= "A" && i <= "Z") || (i >= "a" && i <= "z") || (i == ")")}function m(r, j, i) {var s = j.index,t;while (s >= i) {t = r.charAt(--s);if (t == "\n") {break}if (t == "'") {continue} else {return !g(t)}}return true}function a(i) {var j = i.length - 1,r;while (j > 0) {r = i.charAt(--j);if (r == "\n") {return true}if (r == "%") {return false}}return true}function n(t) {var s, u = 0,r, v = /(\'[^\'\n]*\')/gi,j = [];while (s = v.exec(t)) {if (m(t, s, u)) {var w = t.slice(u, s.index);for (var i = j.length - 2; i >= 0; i -= 2) {if (w.indexOf("\n") > -1) {break}w = w.concat(j[i])}if (a(w)) {r = s.index + s[1].length;j.push(t.slice(u, s.index));j.push(t.slice(s.index, r));u = r}}}j.push(t.slice(u));return j}function b(u, j) {var w = '<span class="',v = "</span>";if (j) {return [w, 'matlab-string">', u, v].join("")} else {var t = [{r: /\b('|break|case|catch|classdef|continue|else|elseif|end|for|function|global|if|otherwise|parfor|persistent|return|spmd|switch|try|while|')\b/gi,s: "keyword"}, {r: /\b([0-9]+)\b/gi,s: "number"}, {r: /([(){}\[\]]+)/gi,s: "bracket"}, {r: /(%[^\n]*)/gi,s: "comment"}];for (var r = 0, s = t.length; r < s; r++) {u = u.replace(t[r].r, [w, "matlab-", t[r].s, '">$1', v].join(""))}return u}}function q(u) {var w = [],s = [];if (typeof u === "undefined") {u = {tagPre: true,tagCode: false,className: "matlab-code"}}if (typeof u !== "object") {w.push(document.getElementById(u))} else {if (u.tagCode) {s.push("code")}if (u.tagPre) {s.push("pre")}for (var t = 0; t < s.length; t++) {var x = document.getElementsByTagName(s[t]);for (var r = 0, v = x.length; r < v; r++) {if ((u.className == "") || ((x[r].className.toString().length > 0) && ((" " + x[r].className + " ").indexOf(" " +u.className + " ") > -1))) {w.push(x[r])}}}}return w}var p = q(d);for (var f = 0, o = p.length; f < o; f++) {var c = n(p[f].innerHTML.toString().replace(/<br\s*\/?>/mg, "\n")),h = [],l = "&nbsp;";for (var e = 0, k = c.length; e < k; e++) {h.push(b(c[e], e % 2))}p[f].innerHTML = h.join("").replace(/^[ ]/gm, l).replace(/\n/gm, "<br>").replace(/\t/gm, l + l)}
};// 自定义markdown
function mymd() {var d = document;var cnblogs_post_body = d.getElementById('cnblogs_post_body');if (cnblogs_post_body != null) {var html = d.getElementById('cnblogs_post_body').innerHTML;html = md2video(html);html = md2music(html);d.getElementById('cnblogs_post_body').innerHTML = html;}// 自定义视频语法function md2video(str) {var video_str1 = '<div class="video"><iframe src="';var video_str2 ='" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"></iframe></div>';return str.replace(/\<p\>\{video\}\(([^{}()]+)\)\<\/p\>/g, function(match, $1) {return video_str1 + $1 + video_str2});}// 自定义音乐语法function md2music(str) {var music_str1 = '<div class="music"><iframe src="';var music_str2 ='" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"></iframe></div>';return str.replace(/\<p\>\{music\}\(([^{}()]+)\)\<\/p\>/g, function(match, $1) {return music_str1 + $1 + music_str2});}}/* ========================================================================* Bootstrap: scrollspy.js v3.3.5* http://getbootstrap.com/javascript/#scrollspy* ========================================================================* Copyright 2011-2015 Twitter, Inc.* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)* ======================================================================== */+function ($) {'use strict';// SCROLLSPY CLASS DEFINITION// ==========================function ScrollSpy(element, options) {this.$body          = $(document.body)this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)this.options        = $.extend({}, ScrollSpy.DEFAULTS, options)this.selector       = (this.options.target || '') + ' .nav li > a'this.offsets        = []this.targets        = []this.activeTarget   = nullthis.scrollHeight   = 0this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))this.refresh()this.process()}ScrollSpy.VERSION  = '3.3.5'ScrollSpy.DEFAULTS = {offset: 10}ScrollSpy.prototype.getScrollHeight = function () {return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)}ScrollSpy.prototype.refresh = function () {var that          = thisvar offsetMethod  = 'offset'var offsetBase    = 0this.offsets      = []this.targets      = []this.scrollHeight = this.getScrollHeight()if (!$.isWindow(this.$scrollElement[0])) {offsetMethod = 'position'offsetBase   = this.$scrollElement.scrollTop()}this.$body.find(this.selector).map(function () {var $el   = $(this)var href  = $el.data('target') || $el.attr('href')var $href = /^#./.test(href) && $(href)return ($href&& $href.length&& $href.is(':visible')&& [[$href[offsetMethod]().top + offsetBase, href]]) || null}).sort(function (a, b) { return a[0] - b[0] }).each(function () {that.offsets.push(this[0])that.targets.push(this[1])})}ScrollSpy.prototype.process = function () {var scrollTop    = this.$scrollElement.scrollTop() + this.options.offsetvar scrollHeight = this.getScrollHeight()var maxScroll    = this.options.offset + scrollHeight - this.$scrollElement.height()var offsets      = this.offsetsvar targets      = this.targetsvar activeTarget = this.activeTargetvar iif (this.scrollHeight != scrollHeight) {this.refresh()}if (scrollTop >= maxScroll) {return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)}if (activeTarget && scrollTop < offsets[0]) {this.activeTarget = nullreturn this.clear()}for (i = offsets.length; i--;) {activeTarget != targets[i]&& scrollTop >= offsets[i]&& (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])&& this.activate(targets[i])}}ScrollSpy.prototype.activate = function (target) {this.activeTarget = targetthis.clear()var selector = this.selector +'[data-target="' + target + '"],' +this.selector + '[href="' + target + '"]'var active = $(selector).parents('li').addClass('active')if (active.parent('.dropdown-menu').length) {active = active.closest('li.dropdown').addClass('active')}active.trigger('activate.bs.scrollspy')}ScrollSpy.prototype.clear = function () {$(this.selector).parentsUntil(this.options.target, '.active').removeClass('active')}// SCROLLSPY PLUGIN DEFINITION// ===========================function Plugin(option) {return this.each(function () {var $this   = $(this)var data    = $this.data('bs.scrollspy')var options = typeof option == 'object' && optionif (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))if (typeof option == 'string') data[option]()})}var old = $.fn.scrollspy$.fn.scrollspy             = Plugin$.fn.scrollspy.Constructor = ScrollSpy// SCROLLSPY NO CONFLICT// =====================$.fn.scrollspy.noConflict = function () {$.fn.scrollspy = oldreturn this}// SCROLLSPY DATA-API// ==================$(window).on('load.bs.scrollspy.data-api', function () {$('[data-spy="scroll"]').each(function () {var $spy = $(this)Plugin.call($spy, $spy.data())})})}(jQuery);

monse.js:

(function ($) {$.extend({shuicheMouse: (options) => {var silence = new Silence();silence.init(options);}});class Silence {constructor() {this.defaluts = {type: 1,color: false,};this.version = '0.0.1';}get cnblogs() {return {canvase: '#shuicheCanvase',};}/*** 初始化* @param {Object} options 全局配置选项*/init(options) {(function () {var lastTime = 0;var vendors = ['webkit', 'moz'];for (var xx = 0; xx < vendors.length && !window.requestAnimationFrame; ++xx) {window.requestAnimationFrame = window[vendors[xx] + 'RequestAnimationFrame'];window.cancelAnimationFrame = window[vendors[xx] + 'CancelAnimationFrame'] ||window[vendors[xx] + 'CancelRequestAnimationFrame'];}if (!window.requestAnimationFrame) {window.requestAnimationFrame = function (callback, element) {var currTime = new Date().getTime();var timeToCall = Math.max(0, 16.7 - (currTime - lastTime));var id = window.setTimeout(function () {callback(currTime + timeToCall);}, timeToCall);lastTime = currTime + timeToCall;return id;};}if (!window.cancelAnimationFrame) {window.cancelAnimationFrame = function (id) {clearTimeout(id);};}}());if (options) {$.extend(true, this.defaluts, options);}//创建 canvas 标签var canvas = $("<canvas id='shuicheCanvas' style='position: fixed; left: 0px; top: 0px; z-index: 2147483647;pointer-events:none;'></canvas>");//var canvas=$("<canvas id='shuicheCanvas'></canvas>");$("body").append(canvas);let typeId = this.defaluts.type;if (typeId >= 1 && typeId < 11) {this.mouseType1(this.defaluts.type, this.defaluts.color);}if (typeId == 11) {this.mouseType2()}if (typeId == 12) {this.mouseType3()}}mouseType1(type, myColor) {var canvas = document.getElementById("shuicheCanvas");var ctx = canvas.getContext("2d");var c = $("#shuicheCanvas");var x, y, w, h, cx, cy, l;var y = [];var b = {n: 100,c: 222,    //  颜色  如果是false 则是随机渐变颜色bc: '#fff',   //  背景颜色r: 0.9,o: 0.05,a: 1,s: 20,}var bx = 0, by = 0, vx = 0, vy = 0;var td = 0;var p = 0;var hs = 0;re();var color = Math.random() * 360;var color2;if (myColor) {color2 = myColor;} else {color2 = 'hsl(' + color + ',100%,80%)';}$(window).resize(function () {re();});var tp = type;//每一帧渲染都会执行此函数function begin() {if (tp == 1) {ctx.clearRect(0, 0, w, h);for (var i = 0; i < y.length; i++) {ctx.globalAlpha = y[i].o;ctx.fillStyle = color2;ctx.beginPath();ctx.arc(y[i].x, y[i].y, y[i].r, 0, Math.PI * 2);ctx.closePath();ctx.fill();y[i].r += b.r;y[i].o -= b.o;if (y[i].o <= 0) {y.splice(i, 1);i--;};}} else if (tp == 2) {ctx.clearRect(0, 0, w, h);for (var i = 0; i < y.length; i++) {ctx.globalAlpha = y[i].o;ctx.fillStyle = color2;ctx.beginPath();y[i].r = 10;ctx.shadowBlur = 20;ctx.shadowColor = color2;ctx.arc(y[i].x, y[i].y, y[i].r, 0, Math.PI * 2);ctx.closePath();ctx.fill();ctx.shadowBlur = 0;y[i].o -= b.o;y[i].v += b.a;y[i].y += y[i].v;if (y[i].y >= h + y[i].r || y[i].o <= 0) {y.splice(i, 1);i--;};}} else if (tp == 3) {td += 5;ctx.clearRect(0, 0, w, h);for (var i = 0; i < y.length; i++) {ctx.globalAlpha = y[i].o;ctx.fillStyle = color2;ctx.beginPath();ctx.shadowBlur = 20;ctx.shadowColor = color2;y[i].r = (1 - (y[i].y / h)) * 20;ctx.arc(y[i].x, y[i].y, y[i].r, 0, Math.PI * 2);ctx.closePath();ctx.fill();ctx.shadowBlur = 0;y[i].o = y[i].y / h;y[i].v += b.a;y[i].y -= b.s;y[i].x += (Math.cos((y[i].y + td) / 100) * 10);if (y[i].y <= 0 - y[i].r || y[i].o <= 0) {y.splice(i, 1);i--;};}} else if (tp == 4) {ctx.clearRect(0, 0, w, h);for (var i = 0; i < y.length; i++) {ctx.globalAlpha = y[i].o;ctx.fillStyle = color2;ctx.beginPath();ctx.shadowBlur = 20;ctx.shadowColor = color2;y[i].vx2 += (cx - y[i].wx) / 1000;y[i].vy2 += (cy - y[i].wy) / 1000;y[i].wx += y[i].vx2;y[i].wy += y[i].vy2;y[i].o -= b.o / 2;y[i].r = 10;ctx.arc(y[i].wx, y[i].wy, y[i].r, 0, Math.PI * 2);ctx.closePath();ctx.fill();ctx.shadowBlur = 0;if (y[i].o <= 0) {y.splice(i, 1);i--;};}} else if (tp == 5) {if (!b.c) {color += .1;color2 = 'hsl(' + color + ',100%,80%)';}ctx.clearRect(0, 0, w, h);p += 10;ctx.globalAlpha = 1;ctx.fillStyle = color2;ctx.shadowBlur = 20;ctx.shadowColor = color2;ctx.beginPath();ctx.arc(cx + 50 * Math.cos(p * Math.PI / 180), cy + 50 * Math.sin(p * Math.PI / 180), 10, 0, Math.PI * 2);ctx.closePath();ctx.fill();ctx.beginPath();ctx.arc(cx + 50 * Math.cos((p + 180) * Math.PI / 180), cy + 50 * Math.sin((p + 180) * Math.PI / 180), 10, 0, Math.PI * 2);ctx.closePath();ctx.fill();ctx.beginPath();ctx.arc(cx + 50 * Math.cos((p + 90) * Math.PI / 180), cy + 50 * Math.sin((p + 90) * Math.PI / 180), 10, 0, Math.PI * 2);ctx.closePath();ctx.fill();ctx.beginPath();ctx.arc(cx + 50 * Math.cos((p + 270) * Math.PI / 180), cy + 50 * Math.sin((p + 270) * Math.PI / 180), 10, 0, Math.PI * 2);ctx.closePath();ctx.fill();ctx.shadowBlur = 0;} else if (tp == 6) {ctx.clearRect(0, 0, w, h);for (var i = 0; i < y.length; i++) {ctx.globalAlpha = y[i].o;ctx.strokeStyle = color2;ctx.beginPath();ctx.lineWidth = 2;ctx.moveTo(y[i].x, y[i].y);ctx.lineTo((y[i].wx + y[i].x) / 2 + Math.random() * 20, (y[i].wy + y[i].y) / 2 + Math.random() * 20);ctx.lineTo(y[i].wx, y[i].wy);ctx.closePath();ctx.stroke();y[i].o -= b.o;if (y[i].o <= 0) {y.splice(i, 1);i--;};}} else if (tp == 7) {ctx.clearRect(0, 0, w, h);if (y.length < b.n * 2) {hs = Math.random() * 2 * Math.PI;y.push({x: cx + ((Math.random() - .5) * 100 * Math.cos(hs)),y: cy + ((Math.random() - .5) * 100 * Math.cos(hs)),o: 1,h: hs});}for (var i = 0; i < y.length; i++) {ctx.globalAlpha = y[i].o;ctx.fillStyle = color2;ctx.beginPath();y[i].x += (cx - y[i].x) / 10;y[i].y += (cy - y[i].y) / 10;ctx.arc(y[i].x, y[i].y, 1, 0, Math.PI * 2);ctx.closePath();ctx.fill();y[i].o -= b.o;if (y[i].o <= 0) {y[i].h = Math.random() * 2 * Math.PI;y[i].x = cx + ((Math.random() - .5) * 100 * Math.cos(y[i].h));y[i].y = cy + ((Math.random() - .5) * 100 * Math.sin(y[i].h));y[i].o = 1;};}} else if (tp == 8) {ctx.clearRect(0, 0, w, h);ctx.fillStyle = color2;if (cx % 4 == 0) {cx += 1;} else if (cx % 4 == 2) {cx -= 1} else if (cx % 4 == 3) {cx -= 2}if (cy % 4 == 0) {cy += 1;} else if (cy % 4 == 2) {cy -= 1} else if (cy % 4 == 3) {cy -= 2}for (var i = cx - 60; i < cx + 60; i += 4) {for (var j = cy - 60; j < cy + 60; j += 4) {if (Math.sqrt(Math.pow(cx - i, 2) + Math.pow(cy - j, 2)) <= 60) {ctx.globalAlpha = 1 - (Math.sqrt(Math.pow(cx - i, 2) + Math.pow(cy - j, 2)) / 60);if (Math.random() < .2) {ctx.fillRect(i, j, 3, 3);}}}}} else if (tp == 9) {ctx.clearRect(0, 0, w, h);ctx.fillStyle = color2;if (cx % 4 == 0) {cx += 1;} else if (cx % 4 == 2) {cx -= 1} else if (cx % 4 == 3) {cx -= 2}if (cy % 4 == 0) {cy += 1;} else if (cy % 4 == 2) {cy -= 1} else if (cy % 4 == 3) {cy -= 2}if (y.length < b.n) {y.push({x: cx, y: cy, xv: 0, yv: 0, o: 1});}for (var i = 0; i < y.length; i++) {if (y[i].xv == 0 && y[i].yv == 0) {if (Math.random() < .5) {if (Math.random() < .5) {y[i].xv = 3;} else {y[i].xv = -3;}} else {if (Math.random() < .5) {y[i].yv = 3;} else {y[i].yv = -3;}}} else {if (y[i].xv == 0) {if (Math.random() < .66) {y[i].yv = 0;if (Math.random() < .5) {y[i].xv = 3;} else {y[i].xv = -3;}}} else if (y[i].yv == 0) {if (Math.random() < .66) {y[i].xv = 0;if (Math.random() < .5) {y[i].yv = 3;} else {y[i].yv = -3;}}}}y[i].o -= b.o / 2;ctx.globalAlpha = y[i].o;y[i].x += y[i].xv;y[i].y += y[i].yv;ctx.fillRect(y[i].x, y[i].y, 3, 3);if (y[i].o <= 0) {y.splice(i, 1);i--;};}} else if (tp == 10) {ctx.clearRect(0, 0, w, h);ctx.fillStyle = color2;y.push({x: cx, y: cy, xv: 2, yv: 1, o: 1});for (var i = 0; i < y.length; i++) {y[i].o -= b.o / 10;ctx.globalAlpha = y[i].o;y[i].x += (Math.random() - .5) * 4;y[i].y -= 1;ctx.fillRect(y[i].x, y[i].y, 2, 2);if (y[i].o <= 0) {y.splice(i, 1);i--;};}}window.requestAnimationFrame(begin);}function re() {w = window.innerWidth;h = window.innerHeight;canvas.width = w;canvas.height = h;cx = w / 2;cy = h / 2;};$(window).mousemove(function (e) {cx = e.pageX - c.offset().left;cy = e.pageY - c.offset().top;if (tp == 4) {if (Math.random() <= .5) {if (Math.random() <= .5) {bx = -10;} else {bx = w + 10;}by = Math.random() * h;} else {if (Math.random() <= .5) {by = -10;} else {by = h + 10;}bx = Math.random() * w;}vx = (Math.random() - .5) * 8;vy = (Math.random() - .5) * 8;}if (tp == 1 || tp == 2 || tp == 3) {y.push({x: cx, y: cy, r: b.r, o: 1, v: 0});} else if (tp == 4) {y.push({x: cx, y: cy, r: b.r, o: 1, v: 0, wx: bx, wy: by, vx2: vx, vy2: vy});} else if (tp == 6) {y.push({x: cx + ((Math.random() - .5) * 30),y: cy + ((Math.random() - .5) * 30),o: 1,wx: cx,wy: cy});}});begin();}mouseType2() {var SCREEN_WIDTH = window.innerWidth;var SCREEN_HEIGHT = window.innerHeight;var RADIUS = 70;var RADIUS_SCALE = 1;var RADIUS_SCALE_MIN = 1;var RADIUS_SCALE_MAX = 1.5;var QUANTITY = 25;var canvas;var context;var particles;var mouseX = SCREEN_WIDTH * 0.5;var mouseY = SCREEN_HEIGHT * 0.5;var mouseIsDown = false;function init() {canvas = document.getElementById('shuicheCanvas');if (canvas && canvas.getContext) {context = canvas.getContext('2d');// Register event listenerswindow.addEventListener('mousemove', documentMouseMoveHandler, false);window.addEventListener('mousedown', documentMouseDownHandler, false);window.addEventListener('mouseup', documentMouseUpHandler, false);document.addEventListener('touchstart', documentTouchStartHandler, false);document.addEventListener('touchmove', documentTouchMoveHandler, false);window.addEventListener('resize', windowResizeHandler, false);createParticles();windowResizeHandler();loop()}}//创建线条function createParticles() {particles = [];for (var i = 0; i < QUANTITY; i++) {var particle = {size: 1,position: {x: mouseX, y: mouseY},offset: {x: 0, y: 0},shift: {x: mouseX, y: mouseY},speed: 0.01 + Math.random() * 0.04,targetSize: 1,fillColor: '#' + (Math.random() * 0x904040 + 0xaaaaaa | 0).toString(16),orbit: RADIUS * .5 + (RADIUS * .5 * Math.random())};particles.push(particle);}}//鼠标移动事件function documentMouseMoveHandler(event) {mouseX = event.clientX - (window.innerWidth - SCREEN_WIDTH) * .5;mouseY = event.clientY - (window.innerHeight - SCREEN_HEIGHT) * .5;}//鼠标按下function documentMouseDownHandler(event) {mouseIsDown = true;}//鼠标抬起function documentMouseUpHandler(event) {mouseIsDown = false;}//移动端 touchfunction documentTouchStartHandler(event) {if (event.touches.length == 1) {event.preventDefault();mouseX = event.touches[0].pageX - (window.innerWidth - SCREEN_WIDTH) * .5;;mouseY = event.touches[0].pageY - (window.innerHeight - SCREEN_HEIGHT) * .5;}}//移动端滑动function documentTouchMoveHandler(event) {if (event.touches.length == 1) {event.preventDefault();mouseX = event.touches[0].pageX - (window.innerWidth - SCREEN_WIDTH) * .5;;mouseY = event.touches[0].pageY - (window.innerHeight - SCREEN_HEIGHT) * .5;}}//窗口大小改变function windowResizeHandler() {SCREEN_WIDTH = window.innerWidth;SCREEN_HEIGHT = window.innerHeight;canvas.width = SCREEN_WIDTH;canvas.height = SCREEN_HEIGHT;}function loop() {if (mouseIsDown) {RADIUS_SCALE += (RADIUS_SCALE_MAX - RADIUS_SCALE) * (0.02);} else {RADIUS_SCALE -= (RADIUS_SCALE - RADIUS_SCALE_MIN) * (0.02);}RADIUS_SCALE = Math.min(RADIUS_SCALE, RADIUS_SCALE_MAX);//context.fillStyle = 'rgba(0,0,0,0.05)';//context.fillRect(0, 0, context.canvas.width, context.canvas.height);context.clearRect(0, 0, context.canvas.width, context.canvas.height)for (var i = 0, len = particles.length; i < len; i++) {var particle = particles[i];var lp = {x: particle.position.x, y: particle.position.y};// Rotationparticle.offset.x += particle.speed;particle.offset.y += particle.speed;// Follow mouse with some lagparticle.shift.x += (mouseX - particle.shift.x) * (particle.speed);particle.shift.y += (mouseY - particle.shift.y) * (particle.speed);// Apply positionparticle.position.x = particle.shift.x + Math.cos(i + particle.offset.x) * (particle.orbit * RADIUS_SCALE);particle.position.y = particle.shift.y + Math.sin(i + particle.offset.y) * (particle.orbit * RADIUS_SCALE);// Limit to screen boundsparticle.position.x = Math.max(Math.min(particle.position.x, SCREEN_WIDTH), 0);particle.position.y = Math.max(Math.min(particle.position.y, SCREEN_HEIGHT), 0);particle.size += (particle.targetSize - particle.size) * 0.01;if (Math.round(particle.size) == Math.round(particle.targetSize)) {particle.targetSize = 1 + Math.random() * 2;}context.beginPath();context.fillStyle = particle.fillColor;context.strokeStyle = particle.fillColor;context.lineWidth = particle.size;context.moveTo(lp.x, lp.y);context.lineTo(particle.position.x, particle.position.y);context.stroke();context.arc(particle.position.x, particle.position.y, particle.size / 2, 0, Math.PI * 2, true);context.fill();}window.requestAnimationFrame(loop);}init()}mouseType3() {//创建 canvas 标签var div = $("<div id='shuicheDiv' style='position: fixed;width: 100%;height: "+ $(window).height() +"px; left: 0px; top: 0px; z-index: 2147483647;pointer-events:none;'></div>");$("body").append(div);var Follow = function () {var $ = function (i) {return document.getElementById(i)};var addEvent = function (o, e, f) {window.addEventListener ? window.addEventListener(e, f, false) : window.attachEvent('on' + e, function () {f.call(window)})}var OBJ = []var spvar rsvar N = 0var m;var init = function (id, config) {this.config = config || {};this.obj = $(id);sp = this.config.speed || 4;rs = this.config.animR || 1;m = {x: $(id).offsetWidth * .5, y: $(id).offsetHeight * .5};this.setXY();this.start();}init.prototype = {setXY: function () {var _this = this;addEvent(this.obj, 'mousemove', function (e) {e = e || window.event;m.x = e.clientX;m.y = e.clientY;})},start: function () {var k = 180 / Math.PI, OO, o, _this = this, fn = this.config.fn;OBJ[N++] = OO = new CObj(null, 0, 0);for (var i = 0; i < 360; i += 20) {var O = OO;for (var j = 10; j < 35; j += 1) {var x = fn(i, j).x,y = fn(i, j).y;OBJ[N++] = o = new CObj(O, x, y);O = o;}}setInterval(function () {for (var i = 0; i < N; i++) OBJ[i].run();}, 16);}}var CObj = function (p, cx, cy) {var obj = document.createElement("span");this.css = obj.style;this.css.backgroundColor = "#2D8CF0"this.css.width="2px";this.css.height="2px";this.css.position = "absolute";this.css.left = "-1000px";this.css.zIndex = 1000 - N;document.getElementById("shuicheDiv").appendChild(obj);this.ddx = 0;this.ddy = 0;this.PX = 0;this.PY = 0;this.x = 0;this.y = 0;this.x0 = 0;this.y0 = 0;this.cx = cx;this.cy = cy;this.parent = p;}CObj.prototype.run = function () {if (!this.parent) {this.x0 = m.x;this.y0 = m.y;} else {this.x0 = this.parent.x;this.y0 = this.parent.y;}this.x = this.PX += (this.ddx += ((this.x0 - this.PX - this.ddx) + this.cx) / rs) / sp;this.y = this.PY += (this.ddy += ((this.y0 - this.PY - this.ddy) + this.cy) / rs) / sp;this.css.left = Math.round(this.x) + 'px';this.css.top = Math.round(this.y) + 'px';}return init;}();new Follow('shuicheDiv', {speed: 4, animR: 2, fn: function (i, j) {return {x: j / 4 * Math.cos(i),y: j / 4 * Math.sin(i)}}})}}
})(jQuery);

mouse.min.js:

"use strict";var _createClass=function(){function n(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,e,i){return e&&n(t.prototype,e),i&&n(t,i),t}}();function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}!function(P){P.extend({shuicheMouse:function(t){(new e).init(t)}});var e=(_createClass(t,[{key:"init",value:function(t){!function(){for(var a=0,t=["webkit","moz"],e=0;e<t.length&&!window.requestAnimationFrame;++e)window.requestAnimationFrame=window[t[e]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[t[e]+"CancelAnimationFrame"]||window[t[e]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(t,e){var i=(new Date).getTime(),n=Math.max(0,16.7-(i-a)),o=window.setTimeout(function(){t(i+n)},n);return a=i+n,o}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})}(),t&&P.extend(!0,this.defaluts,t);var e=P("<canvas id='shuicheCanvas' style='position: fixed; left: 0px; top: 0px; z-index: 2147483647;pointer-events:none;'></canvas>");P("body").append(e);var i=this.defaluts.type;1<=i&&i<11&&this.mouseType1(this.defaluts.type,this.defaluts.color),11==i&&this.mouseType2(),12==i&&this.mouseType3()}},{key:"mouseType1",value:function(t,e){var n,o,a,h,i=document.getElementById("shuicheCanvas"),s=i.getContext("2d"),r=P("#shuicheCanvas"),l=[],c={n:100,c:222,bc:"#fff",r:.9,o:.05,a:1,s:20},d=0,f=0,u=0,y=0,w=0,p=0,v=0;g();var m,x=360*Math.random();m=e||"hsl("+x+",100%,80%)",P(window).resize(function(){g()});var M=t;function g(){n=window.innerWidth,o=window.innerHeight,i.width=n,i.height=o,a=n/2,h=o/2}P(window).mousemove(function(t){a=t.pageX-r.offset().left,h=t.pageY-r.offset().top,4==M&&(Math.random()<=.5?(d=Math.random()<=.5?-10:n+10,f=Math.random()*o):(f=Math.random()<=.5?-10:o+10,d=Math.random()*n),u=8*(Math.random()-.5),y=8*(Math.random()-.5)),1==M||2==M||3==M?l.push({x:a,y:h,r:c.r,o:1,v:0}):4==M?l.push({x:a,y:h,r:c.r,o:1,v:0,wx:d,wy:f,vx2:u,vy2:y}):6==M&&l.push({x:a+30*(Math.random()-.5),y:h+30*(Math.random()-.5),o:1,wx:a,wy:h})}),function t(){if(1==M){s.clearRect(0,0,n,o);for(var e=0;e<l.length;e++)s.globalAlpha=l[e].o,s.fillStyle=m,s.beginPath(),s.arc(l[e].x,l[e].y,l[e].r,0,2*Math.PI),s.closePath(),s.fill(),l[e].r+=c.r,l[e].o-=c.o,l[e].o<=0&&(l.splice(e,1),e--)}else if(2==M)for(s.clearRect(0,0,n,o),e=0;e<l.length;e++)s.globalAlpha=l[e].o,s.fillStyle=m,s.beginPath(),l[e].r=10,s.shadowBlur=20,s.shadowColor=m,s.arc(l[e].x,l[e].y,l[e].r,0,2*Math.PI),s.closePath(),s.fill(),s.shadowBlur=0,l[e].o-=c.o,l[e].v+=c.a,l[e].y+=l[e].v,(l[e].y>=o+l[e].r||l[e].o<=0)&&(l.splice(e,1),e--);else if(3==M)for(w+=5,s.clearRect(0,0,n,o),e=0;e<l.length;e++)s.globalAlpha=l[e].o,s.fillStyle=m,s.beginPath(),s.shadowBlur=20,s.shadowColor=m,l[e].r=20*(1-l[e].y/o),s.arc(l[e].x,l[e].y,l[e].r,0,2*Math.PI),s.closePath(),s.fill(),s.shadowBlur=0,l[e].o=l[e].y/o,l[e].v+=c.a,l[e].y-=c.s,l[e].x+=10*Math.cos((l[e].y+w)/100),(l[e].y<=0-l[e].r||l[e].o<=0)&&(l.splice(e,1),e--);else if(4==M)for(s.clearRect(0,0,n,o),e=0;e<l.length;e++)s.globalAlpha=l[e].o,s.fillStyle=m,s.beginPath(),s.shadowBlur=20,s.shadowColor=m,l[e].vx2+=(a-l[e].wx)/1e3,l[e].vy2+=(h-l[e].wy)/1e3,l[e].wx+=l[e].vx2,l[e].wy+=l[e].vy2,l[e].o-=c.o/2,l[e].r=10,s.arc(l[e].wx,l[e].wy,l[e].r,0,2*Math.PI),s.closePath(),s.fill(),s.shadowBlur=0,l[e].o<=0&&(l.splice(e,1),e--);else if(5==M)c.c||(m="hsl("+(x+=.1)+",100%,80%)"),s.clearRect(0,0,n,o),p+=10,s.globalAlpha=1,s.fillStyle=m,s.shadowBlur=20,s.shadowColor=m,s.beginPath(),s.arc(a+50*Math.cos(p*Math.PI/180),h+50*Math.sin(p*Math.PI/180),10,0,2*Math.PI),s.closePath(),s.fill(),s.beginPath(),s.arc(a+50*Math.cos((p+180)*Math.PI/180),h+50*Math.sin((p+180)*Math.PI/180),10,0,2*Math.PI),s.closePath(),s.fill(),s.beginPath(),s.arc(a+50*Math.cos((p+90)*Math.PI/180),h+50*Math.sin((p+90)*Math.PI/180),10,0,2*Math.PI),s.closePath(),s.fill(),s.beginPath(),s.arc(a+50*Math.cos((p+270)*Math.PI/180),h+50*Math.sin((p+270)*Math.PI/180),10,0,2*Math.PI),s.closePath(),s.fill(),s.shadowBlur=0;else if(6==M)for(s.clearRect(0,0,n,o),e=0;e<l.length;e++)s.globalAlpha=l[e].o,s.strokeStyle=m,s.beginPath(),s.lineWidth=2,s.moveTo(l[e].x,l[e].y),s.lineTo((l[e].wx+l[e].x)/2+20*Math.random(),(l[e].wy+l[e].y)/2+20*Math.random()),s.lineTo(l[e].wx,l[e].wy),s.closePath(),s.stroke(),l[e].o-=c.o,l[e].o<=0&&(l.splice(e,1),e--);else if(7==M)for(s.clearRect(0,0,n,o),l.length<2*c.n&&(v=2*Math.random()*Math.PI,l.push({x:a+100*(Math.random()-.5)*Math.cos(v),y:h+100*(Math.random()-.5)*Math.cos(v),o:1,h:v})),e=0;e<l.length;e++)s.globalAlpha=l[e].o,s.fillStyle=m,s.beginPath(),l[e].x+=(a-l[e].x)/10,l[e].y+=(h-l[e].y)/10,s.arc(l[e].x,l[e].y,1,0,2*Math.PI),s.closePath(),s.fill(),l[e].o-=c.o,l[e].o<=0&&(l[e].h=2*Math.random()*Math.PI,l[e].x=a+100*(Math.random()-.5)*Math.cos(l[e].h),l[e].y=h+100*(Math.random()-.5)*Math.sin(l[e].h),l[e].o=1);else if(8==M)for(s.clearRect(0,0,n,o),s.fillStyle=m,a%4==0?a+=1:a%4==2?--a:a%4==3&&(a-=2),h%4==0?h+=1:h%4==2?--h:h%4==3&&(h-=2),e=a-60;e<a+60;e+=4)for(var i=h-60;i<h+60;i+=4)Math.sqrt(Math.pow(a-e,2)+Math.pow(h-i,2))<=60&&(s.globalAlpha=1-Math.sqrt(Math.pow(a-e,2)+Math.pow(h-i,2))/60,Math.random()<.2&&s.fillRect(e,i,3,3));else if(9==M)for(s.clearRect(0,0,n,o),s.fillStyle=m,a%4==0?a+=1:a%4==2?--a:a%4==3&&(a-=2),h%4==0?h+=1:h%4==2?--h:h%4==3&&(h-=2),l.length<c.n&&l.push({x:a,y:h,xv:0,yv:0,o:1}),e=0;e<l.length;e++)0==l[e].xv&&0==l[e].yv?Math.random()<.5?Math.random()<.5?l[e].xv=3:l[e].xv=-3:Math.random()<.5?l[e].yv=3:l[e].yv=-3:0==l[e].xv?Math.random()<.66&&(l[e].yv=0,Math.random()<.5?l[e].xv=3:l[e].xv=-3):0==l[e].yv&&Math.random()<.66&&(l[e].xv=0,Math.random()<.5?l[e].yv=3:l[e].yv=-3),l[e].o-=c.o/2,s.globalAlpha=l[e].o,l[e].x+=l[e].xv,l[e].y+=l[e].yv,s.fillRect(l[e].x,l[e].y,3,3),l[e].o<=0&&(l.splice(e,1),e--);else if(10==M)for(s.clearRect(0,0,n,o),s.fillStyle=m,l.push({x:a,y:h,xv:2,yv:1,o:1}),e=0;e<l.length;e++)l[e].o-=c.o/10,s.globalAlpha=l[e].o,l[e].x+=4*(Math.random()-.5),--l[e].y,s.fillRect(l[e].x,l[e].y,2,2),l[e].o<=0&&(l.splice(e,1),e--);window.requestAnimationFrame(t)}()}},{key:"mouseType2",value:function(){var t,o,a,h=window.innerWidth,s=window.innerHeight,i=70,r=1,l=1,c=1.5,n=25,d=.5*h,f=.5*s,u=!1;function e(t){d=t.clientX-.5*(window.innerWidth-h),f=t.clientY-.5*(window.innerHeight-s)}function y(t){u=!0}function w(t){u=!1}function p(t){1==t.touches.length&&(t.preventDefault(),d=t.touches[0].pageX-.5*(window.innerWidth-h),f=t.touches[0].pageY-.5*(window.innerHeight-s))}function v(t){1==t.touches.length&&(t.preventDefault(),d=t.touches[0].pageX-.5*(window.innerWidth-h),f=t.touches[0].pageY-.5*(window.innerHeight-s))}function m(){h=window.innerWidth,s=window.innerHeight,t.width=h,t.height=s}function x(){u?r+=.02*(c-r):r-=.02*(r-l),r=Math.min(r,c),o.clearRect(0,0,o.canvas.width,o.canvas.height);for(var t=0,e=a.length;t<e;t++){var i=a[t],n={x:i.position.x,y:i.position.y};i.offset.x+=i.speed,i.offset.y+=i.speed,i.shift.x+=(d-i.shift.x)*i.speed,i.shift.y+=(f-i.shift.y)*i.speed,i.position.x=i.shift.x+Math.cos(t+i.offset.x)*(i.orbit*r),i.position.y=i.shift.y+Math.sin(t+i.offset.y)*(i.orbit*r),i.position.x=Math.max(Math.min(i.position.x,h),0),i.position.y=Math.max(Math.min(i.position.y,s),0),i.size+=.01*(i.targetSize-i.size),Math.round(i.size)==Math.round(i.targetSize)&&(i.targetSize=1+2*Math.random()),o.beginPath(),o.fillStyle=i.fillColor,o.strokeStyle=i.fillColor,o.lineWidth=i.size,o.moveTo(n.x,n.y),o.lineTo(i.position.x,i.position.y),o.stroke(),o.arc(i.position.x,i.position.y,i.size/2,0,2*Math.PI,!0),o.fill()}window.requestAnimationFrame(x)}(t=document.getElementById("shuicheCanvas"))&&t.getContext&&(o=t.getContext("2d"),window.addEventListener("mousemove",e,!1),window.addEventListener("mousedown",y,!1),window.addEventListener("mouseup",w,!1),document.addEventListener("touchstart",p,!1),document.addEventListener("touchmove",v,!1),window.addEventListener("resize",m,!1),function(){a=[];for(var t=0;t<n;t++){var e={size:1,position:{x:d,y:f},offset:{x:0,y:0},shift:{x:d,y:f},speed:.01+.04*Math.random(),targetSize:1,fillColor:"#"+(9453632*Math.random()+11184810|0).toString(16),orbit:.5*i+.5*i*Math.random()};a.push(e)}}(),m(),x())}},{key:"mouseType3",value:function(){var t=P("<div id='shuicheDiv' style='position: fixed;width: 100%;height: "+P(window).height()+"px; left: 0px; top: 0px; z-index: 2147483647;pointer-events:none;'></div>");P("body").append(t),new(function(){function i(t){return document.getElementById(t)}function t(t,e){this.config=e||{},this.obj=i(t),n=this.config.speed||4,o=this.config.animR||1,a={x:.5*i(t).offsetWidth,y:.5*i(t).offsetHeight},this.setXY(),this.start()}var n,o,a,r=[],l=0;t.prototype={setXY:function(){var t,e;this.obj,t="mousemove",e=function(t){t=t||window.event,a.x=t.clientX,a.y=t.clientY},window.addEventListener?window.addEventListener(t,e,!1):window.attachEvent("on"+t,function(){e.call(window)})},start:function(){Math.PI;var t,e,i=this.config.fn;r[l++]=t=new c(null,0,0);for(var n=0;n<360;n+=20)for(var o=t,a=10;a<35;a+=1){var h=i(n,a).x,s=i(n,a).y;r[l++]=e=new c(o,h,s),o=e}setInterval(function(){for(var t=0;t<l;t++)r[t].run()},16)}};var c=function(t,e,i){var n=document.createElement("span");this.css=n.style,this.css.backgroundColor="#2D8CF0",this.css.width="2px",this.css.height="2px",this.css.position="absolute",this.css.left="-1000px",this.css.zIndex=1e3-l,document.getElementById("shuicheDiv").appendChild(n),this.ddx=0,this.ddy=0,this.PX=0,this.PY=0,this.x=0,this.y=0,this.x0=0,this.y0=0,this.cx=e,this.cy=i,this.parent=t};return c.prototype.run=function(){this.parent?(this.x0=this.parent.x,this.y0=this.parent.y):(this.x0=a.x,this.y0=a.y),this.x=this.PX+=(this.ddx+=(this.x0-this.PX-this.ddx+this.cx)/o)/n,this.y=this.PY+=(this.ddy+=(this.y0-this.PY-this.ddy+this.cy)/o)/n,this.css.left=Math.round(this.x)+"px",this.css.top=Math.round(this.y)+"px"},t}())("shuicheDiv",{speed:4,animR:2,fn:function(t,e){return{x:e/4*Math.cos(t),y:e/4*Math.sin(t)}}})}},{key:"cnblogs",get:function(){return{canvase:"#shuicheCanvase"}}}]),t);function t(){_classCallCheck(this,t),this.defaluts={type:1,color:!1},this.version="0.0.1"}}(jQuery);

涉及相关图片

TJBK.ico:https://blog-static.cnblogs.com/files/blogs/746240/TJBK.ico?t=1649246525

mouse.ico:https://blog-static.cnblogs.com/files/blogs/746240/mouse.ico?t=1649297562

总结

长话短说,就祝你们博客园之旅玩的愉快!

体验网址:https://www.cnblogs.com/Hacker-TJBK/

博客园主题TJBK老版本代码相关推荐

  1. 博客园 页首html代码,可爱的博客园样式美化、自定义博客园主题样式

    cute-cnblogs 说明 "我经常有那种感觉,如果这个事情来了,你却没有勇敢地去解决掉,它一定会再来.生活真是这样,它会一次次地让你去做这个功课直到你学会为止." -- &l ...

  2. 博客园页面定制html代码,博客园主题分享

    博客园主题 分享 选择Custom主题 页面定制CSS代码 /*评论框祖传猫猫*/ .comment_textarea{ background:#f5f5f5 url(https://files-cd ...

  3. 博客园页面定制html代码,你要的博客园主题都有!!!

    基于最近很多小伙伴加我微信想要我的博客园主题,那我就把博客园主题整理一下,送给喜欢的小伙伴,园友们喜欢可以收藏,关注,博客园主题仅供参考,博主顺便再多说一句,虽然我可以分享给你们,但是我更愿意你们加我 ...

  4. 打造一个专注阅读的博客园主题

    文章目录 效果展示 基本设置 代码高亮 页面定制 CSS 代码 博客侧边栏公告 页首 HTML代码 页脚 HTML 代码 页脚 HTML 代码中标签介绍(一定要看完!) silence.min.js ...

  5. Silence - 专注于阅读的博客园主题

    最近花了点心思整理了下我的博客园主题代码,今天正式和大家分享一下,感兴趣的园友可以了解一下. 主题介绍 Silence 追求大道至简的终极真理,旨在打造一个干净.专注阅读的博客主题,没有二维空间元素. ...

  6. 可爱的博客园样式美化、自定义博客园主题样式

    cute-cnblogs 说明 "我经常有那种感觉,如果这个事情来了,你却没有勇敢地去解决掉,它一定会再来.生活真是这样,它会一次次地让你去做这个功课直到你学会为止." -- &l ...

  7. 发布一个博客园专用Windows Live Writer代码插件

    一直用Windows Live Writer写博客,不过没找到能与博客园配合得很好的代码插件,每次写完文章发布到博客园总要手动修改代码.所以我自己写了一个博客园专用的Windows Live Writ ...

  8. 博客园美化(3)博客园鼠标点击特效代码

    博客园鼠标点击特效代码 样式效果 鼠标点击出现烟花和"富强", "民主", "文明", "和谐"... 特效 使用方法 ...

  9. 博客园页面定制html代码,可爱的博客园样式美化、自定义博客园主题样式

    cute-cnblogs 说明 "我经常有那种感觉,如果这个事情来了,你却没有勇敢地去解决掉,它一定会再来.生活真是这样,它会一次次地让你去做这个功课直到你学会为止." -- &l ...

最新文章

  1. PyTorch 数据并行处理
  2. mysql 关联 update_关于SQL UPDATE关联更新
  3. SpringBoot+Redis环境搭建
  4. linux 爬虫工具,技术|如何在Ubuntu 14.04 LTS安装网络爬虫工具:Scrapy
  5. c语言程序报告英汉词典,C语言电子英汉词典程序设计报告-自动化1203-李煜明.docx...
  6. ML之FE:结合Kaggle比赛的某一案例细究特征工程(Feature Engineering)思路框架
  7. php获取h1,jQuery获取h1-h6标题元素值方法实例
  8. svn异地同步 linux,svn库两地开发之代码数据的同步包括***连接的全套解决方案
  9. 面试题-java基本数据类型和运算符
  10. eclipse 中配置php的 XDebug调试
  11. php+windows+信号,php 处理信号简单演示
  12. 重装系统——最纯净的windows10系统安装方法
  13. 20.Consent Controller Get请求逻辑实现
  14. 金庸在浙江大学招博士生的考卷
  15. python小玩意——打开摄像头并截图
  16. h5页面使用js实现图片上传(安卓用户也可拍摄、相册二选一)
  17. python打开方式包括_运行Python程序有两种方式:________和________。
  18. jpg转bmp(使用libjpeg)
  19. Fastjson漏洞详情
  20. 《用户至上:用户研究方法与实践(原书第2版)》一2.1 概述

热门文章

  1. 几种线程安全的Map解析
  2. java断点下载工具,RxDownload
  3. 短链系统设计-存储设计
  4. linux ubuntu删除隐藏文件
  5. 抖音吸粉_抖音吸粉点赞的句子(精选50句)
  6. 消除痘印的方法还你光洁肌肤
  7. 简直无敌!java取绝对值的方法
  8. html5图片文字环绕效果,HTML5实现Word中文字全环绕图片效果
  9. MDY全功能底板MP5705PCIE*8GEN3.0
  10. 2021年低压电工考试及低压电工最新解析