直接上代码
博客侧边栏公告: 联系我是通过腾讯qq的方式联系我,会根据qq的在线状态显示不同颜色的图标。
企鹅:
alt=candyメ奶糖 title=candyメ奶糖>
页脚html代码:
请关注我的微博:
candy奶糖
想哥
在博客右侧,浮出一个微博浮动框
页面定制css代码 /*---------------------------------共通 start---------------------------------*/body { margin: 0; padding: 0; font-family: 'microsoft yahei', 'segoe ui', tahoma, arial, helvetica, sans-serif; font-size: 14px; vertical-align: top; color: #000;}#main { margin: 0 auto; padding: 20px 0; width: 1024px;}#maincontent { float: right; width: 790px;}a,a:hover,a:active,a:visited { text-decoration: none; color: #267cb2;}a:hover { text-decoration: none; color: #f60;}ul,li { list-style: none;}ul { margin: 0; padding: 0;}/* 返回顶部 */#totop { width: 28px; height: 65px; position: fixed; right: 20px; bottom: 65px; background: url(http://images.cnblogs.com/cnblogs_com/candies/632934/o_backtop.png) no-repeat 0px 0px; opacity: 0.6;}#totop:hover { opacity: 1; filter: alpha(opacity = 100); background: url(http://images.cnblogs.com/cnblogs_com/candies/632934/o_backtop.png) no-repeat -28px 0px;}/* 页脚微博 */#share { width: 35px; position: fixed; right: 20px; bottom: 150px;}#share a { color: #333;}#share a#sina { line-height: 3; background: transparent url(http://images.cnblogs.com/cnblogs_com/candies/632934/o_wb_logo.png) no-repeat 0px 0px;}#share a#tent { line-height: 3; background: transparent url(http://images.cnblogs.com/cnblogs_com/candies/632934/o_tx_wb_logo.png) no-repeat 0px 0px;}/*#share { position:fixed; bottom: 0px; right: 0px; width: 450px; margin: 0 auto; border: 1px solid #cc0; background: #f4faed; padding: 5px 10px 3px}#share a { background: transparent url(http://image.dili360.com/www/img/sharelogo.png) no-repeat scroll 0 0; line-height: 1.8; color: #333; margin: 0 0 0 10px; padding: 3px 0 3px 18px;}#share a#sina { background-position: 0 -79px}#share a#tent { background-position: 0 -129px}*//* 隐藏页脚 */#footer { background-color: #f1f4f4; padding-top: 25px; color: #333; text-align: center;}#cnzz_stat_icon_1253650355 { width: 100%; display: inline-block; background-color: #f1f4f4; padding-bootom: 25px; text-align: center;}/*---------------------------------共通 end---------------------------------*//*---------------------------------导航栏 start---------------------------------*/#navlist { background: url(http://images.cnblogs.com/cnblogs_com/libaoheng/435190/o_bg-tabs.png) no-repeat center bottom; border: none !important; height: 52px; text-align: center; margin: 0 0 12px; padding: 15px 0 1px; font-size: 16px;}#navlist li { margin: 0; display: inline-block; vertical-align: bottom;}#navlist a { font-family: 'microsoft yahei'; color: #333; text-decoration: none; background: #d8e1ec url(http://i1.asp.net/images/ui/sprite-ui.png?cdn_id=t32) repeat-x 0 -363px; border: 1px solid #d8e1ec; border-bottom: 0; display: block; padding: 16px 36px 0; margin: 0; position: relative; top: 0; text-align: center; -moz-border-radius: 3px 3px 0 0; -webkit-border-radius: 3px 3px 0 0; border-radius: 3px 3px 0 0; min-height: 36px;}#navlist a:hover,#mylinks1_myhomelink { background: white !important; color: #000 !important; border: 1px solid #cfd0d3 !important; border-bottom: 0 !important; -moz-box-shadow: 0 6px 0 #fff, 0 0 4px #bbb !important; -webkit-box-shadow: 0 6px 0 white, 0 0 4px #bbb !important; box-shadow: 0 6px 0 white, 0 0 4px #bbb !important;}/*---------------------------------导航栏 end---------------------------------*//*---------------------------------标题 start---------------------------------*//* 博客标题 */#blogtitle { margin: 0 auto; padding-left: 100px; background-color: #d2d8de; height: 106px;}#blogtitle .title { width: 1024px; margin: 0 auto; padding: 26px 0 0;}#blogtitle h2 { font-size: 14px; font-weight: normal;}/* 标题 */h1 { margin: 0; padding: 0;}h1.posttitle { padding: 0; background: #fff; font-size: 24px;}h1.posttitle a { color: #000; text-decoration: none !important;}h3 { margin: 10px 0; padding: 0; font-size: 14px;}h3.catlisttitle { color: #fff;}/*---------------------------------标题 end---------------------------------*//*---------------------------------侧边栏 start---------------------------------*/#sidebar { min-height: 200px; padding: 0px 0 0px 5px; float: left; -o-text-overflow: ellipsis; text-overflow: ellipsis; overflow: hidden; word-break: break-all;}/* 不显示公告 */.newsitem .catlisttitle { display: none;}/* 时钟 */.divblock,#honehoneclock { display: block;}.blog-news { margin-top: 5px; line-height: 1.5; text-align: left;}.catlist,.catlisttag,.mysearch,.catlistlink,.catlistpostcategory,.catlistpostarchive,.catlistblogrank { border-radius: 7px; border-bottom: 1px dotted #ccc;}.catlisttitle { background-color: #267cb2; font-size: 16px; border-bottom: 1px solid #006600; border-top-left-radius: 7px; border-top-right-radius: 7px; font-size: 1.2em; height: 1.8em; line-height: 1.8em; padding: 5px; text-indent: 0.5em; text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);}/* 加大随笔档案、随笔分类等列表间距 */.catlist ul li,.catlisttag ul li,.catlistlink ul li,.catlistpostarchive ul li,.catlistpostcategory ul li,.catlistblogrank ul li { padding: 5px 0px 5px 10px}/*---------------------------------侧边栏 end---------------------------------*//*---------------------------------博文列表 start---------------------------------*//* 日期块、从随笔分类和随笔档案点开的一览页面 */.day,.entrylistitem { min-height: 10px; _height: 10px; background: #fff; border-radius: 7px; box-shadow: 1px 1px 2px #aaa; margin: 0 5px 20px 0; padding: 5px 20px 5px 20px;}/* 日期标题 */.daytitle { color: #666; line-height: 2.2em; font-size: 22px; clear: both; border-bottom: 1px solid #ccc; text-align: center;}/* 博文标题 */.posttitle,.entrylistposttitle { font-size: 16px; font-weight: bold; padding: 3px 0 4px 24px; border-bottom: 1px dashed #ccc; line-height: 2.5em; clear: both; background: url(http://images.cnblogs.com/cnblogs_com/candies/632934/o_titile-icons.png) no-repeat 0px 50%;}.posttitle a:link,.posttitle a:visited,.posttitle a:active,.entrylistposttitle a:link,.entrylistposttitle a:visited,.entrylistposttitle a:active { transition: all 0.4s linear 0s;}/* 博文标题 */.posttitle a:hover,.entrylistposttitle a:hover { color: #f60; text-decoration: none; margin-left: 10px;}/* 博文内容 */.postcon,.entrylistpostsummary { margin: 10px 0px;}.postdesc a { display: none;}/* 博文post脚 */.postdesc,.entrylistitempostdesc { text-align: right; color: #999;}/* 不显示随笔档案-xx、随笔分类-xx和描述 */.entrylisttitle,.entrylistdescription { display: none;}/*---------------------------------博文列表 end---------------------------------*//*---------------------------------博文内容页面 start---------------------------------*//* 博客签名 */#mysignature { /*background:url(http://images.cnblogs.com/cnblogs_com/candies/632934/o_o_light2.png) no-repeat 10px 50%;*/ background: url(http://images.cnblogs.com/cnblogs_com/candies/632934/o_may.png) no-repeat 20px 40%; margin-top: 20px; padding: 10px 10px 10px 120px; box-shadow: 0px 0px 15px #aaa; border-radius: 25px; border: 1px dotted #ffd596;}#mysignature a { color: #fb9400;}/* 屏蔽广告 */#site_nav_under,#ad_under_post_holder,#google_ad_c2 { display: none;}/*博客目录*/#sidebarview { font-size: 12px; font-family: arial, helvetica, sans-serif; text-align: left; position: fixed; /*将div的位置固定到距离top:50px,right:0px的位置,这样div就会处在最右边的位置,距离顶部50px*/ top: 299px; right: 30px; width: auto; height: auto;}#sidebartab { float: left; width: 30px; border: 1px solid #e5e5e5; border-right: none; text-align: center; background: #ffffff; background-color: #f1f4f4; border-radius: 5px;}#sidebarcontents { /*float:left; overflow:auto; overflow-x:hidden;!important;*/ width: 200px; min-height: 108px; max-height: 460px; border: 1px solid #e5e5e5; background: #ffffff; border-radius: 5px;}#sidebarcontents dl { margin-top: 15px; margin-bottom: 15px; padding: 0;}#sidebarcontents dt { margin-top: 15px; margin-left: 5px;}#sidebarcontents dd,dt { cursor: pointer;}#sidebarcontents dd:hover,dt:hover { color: #a7995a;}/*---------------------------------博文内容页面 end---------------------------------*//*---------------------------------评论 start---------------------------------*//*评论*/#tbcommentbody { width: 500px;}#btn_comment_submit { width: 80px; height: 28px;}.feedbacklistsubtitle div { margin: 5px 10px 5px 10px;}.blog_comment_body fieldset.comment_quote { border-color: #1a8bc8;}/*美化一下评论,增加气泡效果*/.feedbacklistsubtitle { border: 0px none; border-bottom-style: none;}.list { width: 90%;}.list .out,.list .inc { margin: 6px 0; width: 90%;}.list .out .icon,.list .inc .icon { width: 48px; height: 48px;}.list .icontd { width: 48px;}.list .out .icontd { display: none;}.list .out .topleft,.list .out .topright,.list .out .bottomleft,.list .out .bottomright,.list .inc .topleft,.list .inc .topright,.list .inc .bottomleft,.list .inc .bottomright { background: url(http://images.cnblogs.com/cnblogs_com/candies/632934/o_t_o_bubbles.png) no-repeat;}.list .out .top,.list .out .bottom,.list .inc .top,.list .inc .bottom { background: transparent url(http://images.cnblogs.com/cnblogs_com/candies/632934/o_t_o_horizontal.png) repeat-x;}.list .out .left,.list .out .right,.list .inc .left,.list .inc .right { background: transparent url(http://images.cnblogs.com/cnblogs_com/candies/632934/o_t_o_vertical.png) repeat-y;}.list .out .topleft { background-position: left top; height: 9px; width: 18px;}.list .out .topright { background-position: -18px top; height: 9px; width: 11px;}.list .out .bottomleft { background-position: left -9px; width: 18px; height: 12px;}.list .out .bottomright { background-position: right -9px; width: 11px; height: 12px;}.list .out .top { background-position: top; font-size: 1px; height: 9px;}.list .out .bottom { background-position: 0 -9px; height: 12px;}.list .out .left { background-position: left; width: 18px;}.list .out .right { background-position: -18px 0; width: 11px;}.list .inc .topleft { background-position: 0 -21px; height: 9px; width: 18px;}.list .inc .topright { background-position: -18px -21px; height: 9px; width: 11px;}.list .inc .bottomleft { background-position: 0 bottom; width: 18px; height: 12px;}.list .inc .bottomright { background-position: right bottom; width: 11px; height: 12px;}.list .inc .top { background-position: 0 -21px; font-size: 1px; height: 9px;}.list .inc .bottom { background-position: bottom; height: 12px;}.list .inc .left { background-position: -29px 0; width: 18px;}.list .inc .right { background-position: right; width: 11px;}.list .inc .conmts { font-size: 12px; color: #000;}.list .out .conmts { background: #dcdcdc; /*text-shadow:0 1px 0 #eee;*/}.list .inc .conmts { background: #c0e668; /*text-shadow:0 1px 0 #dfa;*/}/*.blog_comment_body { border-radius: 15px; box-shadow: 0px 0px 15px #aaa; border: 2px solid #ffd596; display: inline-block; margin: 10px 0px; padding: 15px; position: relative;}.blog_comment_body_em { display: block; border-width: 15px; position: absolute; top: -32px; left: 20px; border-style: dashed dashed solid; border-color: transparent transparent #ffd596; font-size: 0; line-height: 0;}.blog_comment_body_tag { display: block; border-width: 15px; position: absolute; top: -28px; left: 20px; border-style: dashed dashed solid; border-color: transparent transparent #fff; font-size: 0; line-height: 0;}*//*---------------------------------评论end---------------------------------*/
定制js var blogcommentbody = { createblogcommentstyle : function(id) { //获取博文正文div容器 var elem = document.getelementbyid(id); if (!elem) return false; //获取div中所有元素结点 var nodes = elem.getelementsbytagname(*); //遍历所有元素结点 for ( var i = 0; i 0){commentbubble();cleartimeout(commenttime);}},50); /*页面加载完成之后生成博客目录*/ blogdirectory.createblogdirectory(cnblogs_post_body,h2,h3,20); //blogcommentbody.createblogcommentstyle(blog-comments-placeholder); });