博客樣式美化 一
阿新 • • 發佈:2019-01-19
cal imp pac erb gif note digg istview stc
先看效果
再看代碼
選擇博客園主題
選擇極簡風格的SimpleMenory主題
自定義樣式
頁面CSS
body { color: #000000b3; background: url(https://img2018.cnblogs.com/blog/1367440/201810/1367440-20181028163415543-591919591.jpg) fixed; background-size: 100%; background-repeat: repeat; font-family: "微軟雅黑","Helvetica Neue",Helvetica,Verdana,Arial,sans-serif; font-size: 12px; min-height: 101%; } #blogTitle h1 { font-size: 50px; font-family: Consolas; font-weight: bold; font-style: italic; margin-top: 20px; } .catListTitle { background: none repeat scroll 0% 0% rgb(43, 102, 149); border-bottom: 1px solid #646b87e6; border-top-left-radius: 7px; border-top-right-radius: 7px; color: #FFFFFF; font-size: 1.2em; height: 1.3em; line-height: 1.3em; padding: 5px; text-indent: 0.5em; text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3); } #home { margin: 0 auto; width: 80%; min-width: 1250px; background-color: rgba(248, 248, 248, 0.85); padding: 30px; margin-top: 50px; margin-bottom: 50px; box-shadow: 0 2px 6px rgba(100, 100, 100, 0.3); position: relative; } .newsItem, .catListEssay, .catListLink, .catListNoteBook, .catListTag, .catListPostCategory, .catListPostArchive, .catListImageCategory, .catListArticleArchive, .catListView, .catListFeedback, .mySearch, .catListComment, .catListBlogRank, .catList, .catListArticleCategory { background: none; margin-bottom: 35px; word-wrap: break-word; } #blog-calendar td { font-size: 12px; font-family: Consolas; } .input_my_zzk { border: 1px solid #ccc; background: none; width: 100%; height: 25px; padding-right: 30px; padding-left: 5px; outline: 0; } .CalDayHeader { background: rgba(245,245,245,0.3) !important; font-weight: 100; color: #5E5F63; } .CalTitle { background: none; width: 100%; height: 25px; text-align: center; font-size: 14px; font-weight: bold; padding: 5px 0; color: #FFF; } .CalTitle td { background: rgba(245,245,245,0.3) !important; border: 0px !important; color: #5E5F63; font-family: "Comic Sans MS"; } a:link { color: cornflowerblue; } a:visited { color: cornflowerblue; } a:hover { color:cadetblue; } a:active { color:black; } .CalTodayDay { background: rgba(247,247,247,0.3) !important; color: #D21414B3; font-weight: bold; } .cnblogs_code { background-color: rgba(247,247,247,0.3); font-family: Consolas !important; font-size: 12px!important; border: 1px solid #ccc; padding: 5px 10px; overflow: auto; margin: 5px 0; color: #000; } .cnblogs_code div { background-color: rgba(247,247,247,0.3); } .cnblogs_code_collapse { border-right: gray 1px solid; border-top: gray 1px solid; border-left: gray 1px solid; border-bottom: gray 1px solid; background-color: rgba(247,247,247,0.3); padding: 2px; } blockquote { background: rgba(197, 221, 48, 0.29); border:2px solid #efefef; padding-left: 10px; padding-right: 10px; padding-top: 5px; padding-bottom: 5px; margin-top: 10px; margin-bottom: 10px; } div.commentform input.author, div.commentform input.email, div.commentform input.url { background-image: url(http://static.cnblogs.com/images/icon_form.gif); border: 1px solid white !important; padding: 4px 4px 4px 30px; width: 300px; font-size: 13px; background-color: rgba(247,247,247,0.3); } #comment_form_container .comment_textarea { width: 362px; height: 200px; font-size: 13px; padding: 8px; margin-bottom: 10px; color: #555; border: 1px solid white; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; background-color: rgba(247,247,247,0.3); } .cnblogs_code pre { font-family: Consolas !important; font-size: 12px!important; word-wrap: break-word; white-space: pre-wrap; } .cnblogs_code span { font-family: Consolas !important; font-size: 12px!important; line-height: 1.5!important; } div#cnblogs_c2 { display: none; } div#cnblogs_c1 { display: none; } div#under_post_news { display: none; } div#ad_t2 { display: none; } div#under_post_kb { display: none; } .feedbackItem { margin: 10px 5px 0px; padding: 5px; box-shadow: 0 0 10px 0 #AAA; } #topics .postTitle { font-size:300%; font-weight: normal; } .postTitle a:link, .postTitle a:visited, .postTitle a:active { color: #4b7c92; transition: all 0.4s cubic-bezier(0, 0, 0.12, 1) 0s; } #cnblogs_post_body h2 { padding: 10px 0px; margin: 20px 0px 0px; font-size: 20px; color: #263e54e6; } #cnblogs_post_body h3{ padding: 2px 0px; color: #408392; font-size: 18px; } #cnblogs_post_body h4{ color: #478dbacc; font-size: 16px; } #cnblogs_post_body h5{ color: cadetblue; } #cnblogs_post_body h1{ background: none repeat scroll 0% 0% rgb(43, 102, 149); border-radius: 6px 6px 6px 6px; box-shadow: 0px 0px 0px 1px rgb(95, 90, 75), 1px 1px 6px 1px rgba(10, 10, 0, 0.5); color: rgb(255, 255, 255); font-family: "微軟雅黑","宋體","黑體",Arial; font-size: 20px; font-weight: bold; height: 20px; line-height: 20px; margin: 15px 0px !important; padding: 8px 0px 10px 20px; text-shadow: 2px 2px 3px rgb(34, 34, 34); } .buryit { } #div_digg { /* float: right; position: fixed; width: auto; bottom: 0px; left: 0.5%; margin-bottom: 10px; background: rgba(247,247,247,0.3); margin-right: 30px; font-size: 12px; box-shadow: 0 0 10px 0 #AAA; padding: 10px; border: 2px solid rgba(82, 168, 236, 0.8); text-align: center; margin-top: 10px; */ } textarea { background: rgba(247,247,247,0.3); } #navigatorTitleDiv { padding: 3px; position: fixed; top:244px; right:304px; font-weight:bold; cursor:pointer; background-color: antiquewhite; } #navigatorDiv { border-style:double; padding: 10px; padding-top:30px; position: fixed; top:240px; right:300px; background-color: antiquewhite; } #cnblogs_post_body ul li { color: #0009; } #cnblogs_post_body p { color: #000000b3; } .hljs-comment { font-size: 14px; } .div_my_zzk { width: 198px; } .postBody { font-size: 16px; color: #3c0903b3; } .cnblogs-markdown code, .cnblogs-post-body code{ font-size:14px !important; background-color:#ce9f9f4d !important; margin: 0px 0px 2px 0px; } .cnblogs-markdown .hljs, .cnblogs-post-body .hljs{ color:#1b871be6; } .hljs-keyword, .hljs-selector-tag, .hljs-built_in, .hljs-name, .hljs-tag{ margin:0px 2px 1px 2px; color: #0000ffe6; } .hljs-comment, .hljs-quote, .hljs-variable{ color:#1b871be6; } .hljs-string, .hljs-title, .hljs-section, .hljs-attribute, .hljs-literal, .hljs-template-tag, .hljs-template-variable, .hljs-type, .hljs-addition{ color: #b13535cc; } /*公告欄時鐘樣式*/ .clockdiv{ text-align: center; } /* 重載SimpleMemory樣式 調整公告欄位置*/ #mainContent{ margin-left: -20em; float: right; } #sideBar{ width: 235px; } /* github.com style (c) */ .cnblogs-markdown .hljs { background-color: #999fc61a !important; border: 1px solid #418a2f66 !important; font-size:16px !important; }
側邊公告欄HTML
<div class="clockdiv"><canvas id="clock" width ="200px" height="200px">您的瀏覽器不兼容canvas</canvas><div>
<script type="text/javascript" src="http://files.cnblogs.com/files/lixu880/canvas.js"></script>
頁首HTML代碼
<script type="text/javascript"> $(function(){ $("#home").prepend("<a href='https://github.com/JerzyLeung' target='blank' style='position: absolute; top: 0px; right:0px; border:0; z-index: 1;'><img src='http://images.cnblogs.com/cnblogs_com/stulzq/1239211/o_forkme_right_red_aa0000.png'></a>"); }); </script>
博客樣式美化 一