﻿/*  
作者：新鲜人
地址：http://www.htmlit.com.cn
邮箱：service@htmlit.com.cn
     htmlit@live.com
*/
@charset "utf-8";

body { padding:0; margin:0; font-family:"微软雅黑", "宋体", "Trebuchet MS", Tahoma, Arial, sans-serif; color: #222222; font-size: 12px; line-height: 20px; background: #EEEEEE; background-size:auto; }
* { padding:0; margin:0;}
div, h1, h2, h3, h4, p, form, ul, label, input, textarea, img, span, dl, dt, dd { margin:0; padding:0;}
table {border-collapse:collapse;}
a { text-decoration: none; color:  #333333;}
a:hover { color: #A3D0F2; text-decoration: none;}
ul { padding:0; margin:0;}
li { list-style-type: none;}
img { border: none;}
.clear { clear: both;}
/*主要框架*/
#headerbg { height:120px; background:#5EAAE4; background-size:auto} 
#content { width:980px; padding:20px 0; margin:0 auto; background: url(images/sidebar.png) repeat-y right top;}
#main { float:left; width:720px;}
#sidebar { float:right; width:240px; background:#E0E1E2; overflow:hidden;margin-left: 20px;}
#footer { width:980px; margin:0 auto; color:#FFFFFF; background: #5EAAE4 url(images/foot.png) no-repeat right top;}
/*网站顶部*/
#headerbg .header { width:980px; height:65px; padding-top:35px; margin:0 auto; color:#FFFFFF;}
.header h1 { font-size:23px; line-height:30px;}
.header h3 { font-size:14px; line-height:24px; font-weight:normal;}
.header a { color:#FFFFFF;}
.logo { float:left;}
/*导航*/
.nevbarbg { width:100%; height:40px; background: #A3D0F2;}
.navbar { width:980px; height:40px; line-height:40px; margin:0 auto; background: #A3D0F2; overflow:hidden;}
.navbar ul li { float:left; font-size:16px; padding:0 20px 0 0;}
.navbar ul li a { display:block; float:left; padding:0 10px; color: #333333;}
.navbar ul li a:hover{ background:#FFFFFF; color:#5EAAE4;} 
.navbar ul li a.on{background:#5EAAE4;color:#fff;}
/*搜索框*/
.search { float:right; height: 40px; width: 240px; padding-top:10px;}
#edtSearch { float:left; width:160px; padding:6px 10px; border:1px solid #FFFFFF;}
#btnPost { float:left; background: #A3D0F2; border:none; width:50px; height:30px; font-weight:bold; color:#FFFFFF;}
/*主要内容*/
.post { font-size:14px; margin-bottom:30px; word-break:break-all;}
.post h2 { font-size:20px; line-height:1.45; margin-bottom:10px; color:#5EAAE4;}
.post h4 { font-size:17px; line-height:1.5; margin-bottom:10px; }
.post a { color:#5EAAE4;}
.post a:hover { color: #A3D0F2; text-decoration: none;}
.post_r { float:left; width:670px;}
.post_body { width:640px; background: #FFFFFF; padding:15px; line-height:22px; margin-bottom:5px;}
.post_content { min-height:30px; font-size:16px; line-height:1.8;}
/* 2026-10-30 正文统一 16px：压掉从推特/微信复制进来的内联样式
   （font-size/font-family/color/background-color 都带在 span 上，
   内联优先级高于本表 ⇒ 不 !important 压不住）。只作用于 span/p/div/font，
   不碰 a/img/pre/代码块，链接色与代码块保持原样。
   ⚠ 故意不动 white-space：推特体靠 <span style="white-space:pre-wrap"> 里的
   \n\n\n\n 分段，改成 normal 会让整篇塌成一坨。 */
.post_content span,
.post_content p,
.post_content div,
.post_content font {
    font-size: inherit !important;
    font-family: inherit !important;
    line-height: inherit !important;
    color: inherit !important;
    background-color: transparent !important;
}
.post_content img { 
   max-width:640px;  /*IE7,Firefox*/ 
   width: expression(this.width > 640 ? 640: true);   /*IE6*/ 
}
.post_content p { margin-bottom:10px;}
.post_content ul,.post_content ol{margin-left:3em;	list-style-position : outside;}
.post_content li{	list-style-type:inherit;}
.post_content li p{ margin:5px 0;}
.post_tags { padding:10px 0;}
.post_info { height:30px; line-height:30px; text-align:right; margin-top:10px;}
/**/
.post_time { float: left ; width:40px; height:85px; padding:10px 5px; overflow:hidden; text-align:center; color:#FFFFFF; background: #5EAAE4 url(images/icon/time_right.png) no-repeat  right  bottom;}
.post_time h5 { font-size:26px; line-height:28px; }
.post_time h6 { font-size:10px; line-height:12px; font-weight:normal;}
.post_fu { float:left; width:40px; height:40px; padding:5px 5px; background: #5EAAE4 url(images/icon/fu_right.png) no-repeat right bottom;}
/**/
.postistop {margin-bottom:15px; }
.postistop .post_time{ height:32px; line-height:40px; margin-bottom:10px; background: #5EAAE4 url(images/icon/up_right.png) no-repeat left top;}
.postistop h2 { font-size:20px; line-height:1.45; margin-bottom: 2px;}
/*tagcloud*/
.tags-cloud .tag-name{margin:0 5px;line-height: 1.2;}
.tags-cloud .tag-name-size-0{font-size: 1.1em;}
.tags-cloud .tag-name-size-1{font-size: 1.4em;}
.tags-cloud .tag-name-size-2{font-size: 1.7em;}
.tags-cloud .tag-name-size-3{font-size: 2.1em;}
.tags-cloud .tag-name-size-4{font-size: 2.6em;}
.tags-cloud .tag-name-size-5{font-size: 3.2em;}
.tags-cloud .tag-name-size-6{font-size: 3.9em;}
.tags-cloud .tag-name-size-7{font-size: 4.6em;}
/*上一篇下一篇*/
.post_nav { padding:5px 15px; height:22px; background:#FFFFFF; margin-bottom:5px;}
.post_nav a { color:#5EAAE4;}
.l { float:left;}
.r { float:right;}
/*相关文章*/
.mutuality { padding:15px; background:#FFFFFF; margin-bottom:5px;}
.mutuality_title { font-weight:bold; height:28px; line-height:28px;}
.mutuality_body { padding:0px 5px;}
.mutuality_body p { line-height:24px; background:url(images/li.jpg) no-repeat left 10px; padding-left:10px;}
/*侧栏主体*/
.function { float:left; width:240px; margin-bottom:15px; background: url(images/function_tbg.png) repeat-x left bottom;}
.function_t { float:left; width:210px; height:24px; line-height:24px; padding-bottom:5px; font-size:15px; padding-left:30px; font-weight:bold; color:#5EAAE4;}
.function_c { float:left; width:200px; padding:5px 10px 15px 30px;}
.function_c ul li { line-height:24px; margin-bottom:2px;}
/*图标*/
#divContorPanel .function_t { background: url(images/icon/ContorPanel.png) no-repeat 10px 5px;} /*控制面板*/
#divCatalog .function_t { background: url(images/icon/Catalog.png) no-repeat 10px 5px;} /*网站分类*/
#divComments .function_t { background: url(images/icon/Comments.png) no-repeat 10px 5px;} /*最新评论及回复*/
#divArchives .function_t { background: url(images/icon/Archives.png) no-repeat 10px 5px;} /*文章归档*/
#divFavorites .function_t { background: url(images/icon/Favorites.png) no-repeat 10px 5px;} /*网站收藏*/
#divLinkage .function_t { background: url(images/icon/Linkage.png) no-repeat 10px 5px;} /*友情链接*/
#divMisc .function_t { background: url(images/icon/Misc.png) no-repeat 10px 5px;} /*图标汇集*/
#divStatistics .function_t { background: url(images/icon/Statistics.png) no-repeat 10px 5px;} /*站点统计*/
#divAuthors .function_t { background: url(images/icon/Authors.png) no-repeat 10px 5px;} /*作者列表*/
#divPrevious .function_t { background: url(images/icon/Previous.png) no-repeat 10px 5px;} /*最新文章*/
#divTags .function_t { background: url(images/icon/Tags.png) no-repeat 10px 5px;} /*标签云集*/
#divSearchPanel .function_t { background: url(images/icon/Search.png) no-repeat 10px 5px;} /*搜索*/
/*新版表格日历*/
#divCalendar .function_t { display:none;}
#divCalendar .function_c { width:232px; padding:0 4px 15px 4px;}
#divCalendar table{width:100%; table-layout:fixed}
#divCalendar caption{ text-align:center; height:24px; margin:0; padding:0; font-size:12px; font-weight:bold;}
#divCalendar caption a { padding:0 20px;}
#divCalendar th{background:  #A3D0F2;color: #FFFFFF;text-transform: uppercase;border:1px solid #E0E1E2;height:26px}
#divCalendar td{text-align:center;background:#F0F0F0;border:1px solid #E0E1E2;height:30px;}
#divCalendar td.pad{background:none}
#divCalendar td a{display:block;line-height:30px;background:#5EAAE4; color:#FFFFFF;}
#today{font-weight:bold;}/*这个today真的不该有！*/
/*侧边搜索*/
#divSearchPanel  input[type="text"]{ float:left; width:110px; padding:5px 10px; border:1px solid #FFFFFF;}
#divSearchPanel  input[type="submit"]{ float:left; background:#5EAAE4; border:none; width:50px; height:28px; font-weight:bold;color:#FFFFFF;}
/*侧边分类*/
#divCatalog .li-subcate { padding-left:15px; background:url(images/li-subcate.png) no-repeat left top;}
#divComments li,divPrevious li{ white-space:nowrap; word-break:keep-all; overflow:hidden; text-overflow:ellipsis;}
/*评论列表*/
.commentlist { padding:0 15px; background:#FFFFFF;}
.commentlist h4{ margin-top:15px;}
.commentlist .msg { margin-top:10px; border-top:1px solid #CCCCCC; padding:5px 0 0 0;}
.commentlist .msg .msgimg { float:left; width:48px; height:48px; padding-top:5px;}
.commentlist .msg .msgimg .avatar { width:48px; height:48px;}
.commentlist .msg .msgtxt { width:100%; float:right; margin-left:-60px;}
.commentlist .msg .msgtxt .msgtxtbogy { margin-left:60px;}
.commentlist .msg .msgtxt .msgname { height:24px; line-height:24px;}
.commentlist .msg .msgtxt .msgname span { font-size:12px; color:#999999;}
.commentlist .msg .msgtxt .msgarticle { padding:5px 0;}

.commentlist .msg .msgarticle .msg { font-size:12px;}
.commentlist .msg .msgarticle .msg .msgimg { width:32px; height:32px;}
.commentlist .msg .msgarticle .msg .msgimg .avatar { width:32px; height:32px;}
.commentlist .msg .msgarticle .msg .msgtxt { width:100%; float:right; margin-left:-40px;}
.commentlist .msg .msgarticle .msg .msgtxt .msgtxtbogy { margin-left:40px;}
.commentlist .msg .msgarticle .msg .dot { display:none;}
/*回复图标*/
/*.commentlist .msg .msgarticle .msg .revcount{ width:15px; height:15px;;background: url(images/li-subcate.png) no-repeat left top;}*/

/*发布评论*/
.commentpost { padding:15px; background:#FFFFFF; margin-bottom:10px;}
.commentpost p { margin-bottom:10px;}.commentpost img{ margin-bottom: -6px;}
li.msgarticle div.quote{ margin:10px 0 0 0; padding:10px; background:#FFFFFF; border:1px solid #F4F4F4;}
li.msgarticle div.quote-title{ margin:0; padding:0; font-size:1em; color:#CC0000;}
.commentpost input { width:200px; padding:6px 10px; border:1px solid #CCCCCC;}
.commentpost #txaArticle{ padding:5px; width:95%; height:120px; border:1px solid #CCCCCC;background:none;}
.button { background:#5EAAE4; border:none; width:100px; height:30px; font-weight:bold; color:#FFFFFF; }
#cancel-reply{float:right;margin-right: 2em;}
/*分页*/
.pagebar { padding:5px 10px; text-align:right;}
.pagebar span.page{ color:#FFFFFF; padding:2px 8px; background:#5EAAE4; margin:4px;}
.pagebar span.now-page { color:#5EAAE4; padding:2px 8px; font-weight:bold; background:#FFFFFF; margin:5px;}
/*网站底部*/
.copyright { float:left; width:800px; padding:20px;}
.copyright a { color: #A3D0F2;}
#goTopBtn { float:right; width:120px; height:80px; cursor:pointer;}
#goTopBtn a { display:block; width:120px; height:80px;}
#goTopBtn span { display:none;}

/* =============================================================================
   pad 端顶栏背景补全  ·  2026-10-27 新增（WorkBuddy 追加，原有样式一行未改）
   -----------------------------------------------------------------------------
   症状：iPad 竖屏（769–979px）顶部蓝条右侧那块是灰的，横向滑动后更明显。
   原因：背景条 #headerbg / .nevbarbg 是 width:auto = 视口宽（810），
         而里面的 .header / .navbar 是 980px 定宽，溢出 170px；
         body 底色是 #EEEEEE ⇒ 横向滚到右侧就露出灰。
         （#footer 是 width:980px，反而没这个问题。）
   实测（810 视口）：#headerbg 宽 810，.header 宽 980，scrollWidth 980 / clientWidth 810。
   修法：两条背景的 min-width 兜到 980px，跟着内容走。
   ⚠⚠ 必须限定 min-width:769px —— 下面是 max-width:768px 的手机断点，
     若让 min-width:980 在手机上也生效，刚修好的单栏会被重新撑宽。
   ============================================================================= */
@media screen and (min-width: 769px) {
  #headerbg, .nevbarbg { min-width: 980px; }
}

/* =============================================================================
   手机模式  ·  2026-10-25 新增（由 WorkBuddy 追加，原始样式一行未改）
   -----------------------------------------------------------------------------
   metro 原样式是纯定宽桌面版：
       #content 980px / #main 720px / #sidebar 240px / .post_body 640px
       #footer 980px / .navbar 980px / body 字号 12px / 全文 0 个媒体查询
   两种错法：
     ① 不加 viewport            → 手机按 980px 虚拟宽渲染再整体缩小 = 字极小、版式不变
     ② 只加 viewport 不加断点   → 浏览器真按 360px 排版，定宽内容横向溢出、右侧被切
   所以 <head> 里的 viewport 与本段 @media 必须**同时**生效，缺一不可。
   断点 768px：≥769 完全走原桌面样式，桌面端观感零变化。
   ============================================================================= */
@media screen and (max-width: 768px) {

  /* iOS 别再自动放大正文字号 */
  body { font-size: 14px; line-height: 1.7; -webkit-text-size-adjust: 100%; }

  /* ---------- 顶栏：logo 与搜索框改成上下两行 ---------- */
  #headerbg        { height: auto; padding: 14px 0 12px; }
  #headerbg .header{ width: auto; height: auto; padding: 0 14px; }
  .logo            { float: none; }
  .header h1       { font-size: 20px; line-height: 1.35; }
  .header h3       { font-size: 13px; line-height: 1.5; margin-top: 2px; }
  .search          { float: none; width: auto; height: auto; padding-top: 10px; }
  #edtSearch       { width: calc(100% - 70px); box-sizing: border-box; padding: 7px 10px; }
  #btnPost         { width: 64px; height: 33px; }

  /* ---------- 导航：横向可滑动（原来 overflow:hidden 会把折行项直接裁掉） ---------- */
  .nevbarbg        { height: auto; }
  .navbar          { width: auto; height: auto; line-height: 38px; padding: 0 8px;
                     overflow-x: auto; overflow-y: hidden;
                     white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .navbar::-webkit-scrollbar { display: none; }
  .navbar ul li    { float: none; display: inline-block; font-size: 15px; padding: 0; }
  .navbar ul li a  { float: none; display: inline-block; padding: 0 10px; }

  /* ---------- 主框架：两栏 → 单栏，并去掉那条 240px 的侧栏底图 ---------- */
  #content         { width: auto; padding: 12px 10px; background: none; }
  #main            { float: none; width: auto; }
  #sidebar         { float: none; width: auto; margin: 0; }

  /* ---------- 文章 ---------- */
  .post            { margin-bottom: 22px; }
  .post h2         { font-size: 18px; line-height: 1.45; }
  /* 日期块原本是「左侧 40px 竖条」，手机上会挤掉正文宽度 ⇒ 改成标题上方的横向小标签 */
  .post_time       { float: none; display: inline-block; width: auto; height: auto;
                     padding: 3px 10px; text-align: center; overflow: visible;
                     border-radius: 3px; margin-bottom: 8px;
                     background: #5EAAE4 none; }
  .post_time h5    { display: block; font-size: 17px; line-height: 19px; }
  .post_time h6    { display: block; font-size: 11px; line-height: 13px; margin: 0; }
  /* ⚠ 别把 h6 里的 <br> 去掉：那是「年<br>月」，一隐藏就粘成 202610（实测踩过）。
     保持竖排即可，与原桌面版的「日/年/月」三行结构一致。 */
  .post_time h6 br { display: inline; }
  .post_fu         { float: none; display: inline-block; width: auto; height: auto;
                     padding: 2px 8px; margin-left: 6px; border-radius: 3px;
                     background: #5EAAE4 none; }
  /* 置顶帖的 .post_time 是**空 div**（桌面上靠背景图画一个向上的箭头）。
     手机上背景图被去掉后就剩一个空蓝块，看着像条莫名其妙的横线 ⇒ 改成文字「置顶」标签。 */
  .postistop .post_time { height: auto; line-height: 1; margin-bottom: 8px;
                          padding: 2px 9px; background: #5EAAE4 none; }
  .postistop .post_time::after { content: "置顶"; color: #fff; font-size: 12px; line-height: 20px; }
  .post_r          { float: none; width: auto; }
  .post_body       { width: auto; padding: 12px; line-height: 1.78; }
  .post_content    { overflow-x: auto; }   /* 宽表格/长代码单独滚，别把整页撑破 */
  .post_content img{ max-width: 100% !important; height: auto; }
  .post_info       { text-align: left; }
  .post_nav        { height: auto; padding: 8px 12px; line-height: 1.7; }
  .post_nav .r     { float: none; display: block; }
  .mutuality       { padding: 12px; }

  /* ---------- 侧栏模块：宽度全部跟着撑满 ---------- */
  .function, .function_t, .function_c { float: none; width: auto; }
  .function_t      { padding-left: 34px; font-size: 15px; }
  .function_c      { padding: 6px 12px 14px; }
  #divCatalog .li-subcate { padding-left: 12px; }
  #divCalendar .function_c { width: auto; padding: 0 6px 12px; }
  #divSearchPanel input[type="text"]   { width: calc(100% - 64px); box-sizing: border-box; padding: 6px 8px; }
  #divSearchPanel input[type="submit"] { width: 58px; height: 31px; }

  /* ---------- 评论 ---------- */
  .commentlist     { padding: 0 12px; }
  .commentlist .msg .msgtxt { float: none; width: auto; margin-left: 0; }
  .commentpost     { padding: 12px; }
  .commentpost input { width: 100%; box-sizing: border-box; }
  .commentpost #txaArticle { width: 100% !important; box-sizing: border-box; }
  .button          { width: 100%; height: 36px; }
  #cancel-reply    { float: none; display: block; margin: 8px 0; }

  /* ---------- 页脚：定宽 980 与右侧装饰图都去掉，回到顶部按钮隐藏 ---------- */
  #footer          { width: auto; background: #5EAAE4; padding: 14px 12px; }
  .copyright       { float: none; width: auto; padding: 0; }
  #goTopBtn        { display: none; }

  .pagebar         { padding: 8px 4px; text-align: center; }
}
