找回密码
 立即注册
首页 业界区 业界 基于SimpleMemory皮肤的仿Fixyll主题皮肤

基于SimpleMemory皮肤的仿Fixyll主题皮肤

迁岂罚 4 天前
基于SimpleMemory皮肤的仿Fixyll主题皮肤

页面css定制代码
  1.   /* =====================================================
  2.      Theme : Pixyll Minimalist
  3.      Author: JayZorn
  4.      ===================================================== */
  5.   /* =====================================================
  6.      Web Fonts
  7.      Playfair Display — 高对比几何衬线,西文杂志感
  8.      · 仅含拉丁字符,中文自动 fallback 至系统宋体
  9.      · jsdelivr CDN,国内可访问,无需额外中文字体文件
  10.      ===================================================== */
  11.   @import url("https://cdn.jsdelivr.net/npm/@fontsource/playfair-display@5/index.css");
  12.   /* =====================================================
  13.      0. 全局变量
  14.      · 所有颜色、字体、宽度集中于此,改一处全局生效
  15.      · color-scheme: light 防止系统深色模式干扰自定义色
  16.      ===================================================== */
  17.   :root {
  18.       --bg-color:     #ffffff;   /* 页面背景 */
  19.       --text-main:    #333332;   /* 正文文字 */
  20.       --text-title:   #111111;   /* 标题文字 */
  21.       --code-bg:      #1e1e1e;   /* 代码块背景 */
  22.       --accent-color: #d63384;   /* 行内代码强调色 */
  23.       --max-width:    1020px;    /* 内容区最大宽度 */
  24.       /*
  25.        * 字体栈:
  26.        * --font-serif : 英文 → Playfair Display / 中文 → 系统宋体(自动 fallback)
  27.        * --font-sans  : UI 无衬线,用于导航等非正文区域
  28.        * --font-mono  : 代码块等宽字体
  29.        */
  30.       --font-serif: "Playfair Display", "Songti SC", "SimSun", "STSong", serif;
  31.       --font-sans:  -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  32.       --font-mono:  "Consolas", "Monaco", monospace;
  33.       color-scheme: light; /* 强制浅色模式,不受系统深色模式影响 */
  34.   }
  35.   /* =====================================================
  36.      1. 全局基础
  37.      ===================================================== */
  38.   html, body {
  39.       -webkit-text-size-adjust: 100% !important; /* 禁止移动端自动缩放字号 */
  40.       text-size-adjust:          100% !important;
  41.       background-color: var(--bg-color) !important;
  42.   }
  43.   /* =====================================================
  44.      2. 随笔正文排版
  45.      · 统一字体、行高、字间距、颜色
  46.      · 覆盖博客园默认首行缩进与杂乱字体继承
  47.      ===================================================== */
  48.   /* 正文所有内联/块级元素:统一基础排版 */
  49.   #mainContent .postBody,
  50.   #mainContent .postBody h1, #mainContent .postBody h2,
  51.   #mainContent .postBody h3, #mainContent .postBody h4,
  52.   #mainContent .postBody h5, #mainContent .postBody h6,
  53.   #mainContent .postBody p,  #mainContent .postBody ol,
  54.   #mainContent .postBody ul, #mainContent .postBody li,
  55.   #mainContent .postBody span, #mainContent .postBody a {
  56.       font-family:    var(--font-serif) !important;
  57.       line-height:    1.8 !important;
  58.       letter-spacing: 0.01em !important;
  59.       color:          var(--text-main) !important;
  60.       text-indent:    0 !important;
  61.   }
  62.   /* 列表缩进与项间距 */
  63.   #mainContent .postBody ol,
  64.   #mainContent .postBody ul {
  65.       margin:       1.5em 0 !important;
  66.       padding-left: 1.5em !important;
  67.   }
  68.   #mainContent .postBody li { margin-bottom: 0.6em !important; }
  69.   /* 标题:加粗、深色、移除默认底边框 */
  70.   #mainContent .postBody h1, #mainContent .postBody h2,
  71.   #mainContent .postBody h3, #mainContent .postBody h4,
  72.   #mainContent .postBody h5, #mainContent .postBody h6 {
  73.       color:         var(--text-title) !important;
  74.       font-weight:   700 !important;
  75.       margin:        1.8em 0 0.8em !important;
  76.       border-bottom: none !important;
  77.   }
  78.   /* 消除正文顶部多余间距 */
  79.   #mainContent .postBody,
  80.   #cnblogs_post_body > p:first-child,
  81.   #cnblogs_post_body > h1:first-child,
  82.   #cnblogs_post_body > h2:first-child {
  83.       margin-top:  0 !important;
  84.       padding-top: 0 !important;
  85.   }
  86.   /* =====================================================
  87.      3. 页面布局
  88.      · PC 端:#home flex 居中,#main 限宽
  89.        padding-left: 150px 补偿博客园两栏布局残留的负 margin 偏移
  90.        (若日后博客园修改默认布局,可将此值调为 0)
  91.      · 移动端:全宽、紧凑内边距、防缩放字号
  92.      ===================================================== */
  93.   /* PC 端 (≥768px) */
  94.   @media screen and (min-width: 768px) {
  95.       #home {
  96.           max-width:      100% !important;
  97.           display:        flex !important;
  98.           flex-direction: column !important;
  99.           align-items:    center !important;
  100.       }
  101.       #main {
  102.           width:        100% !important;
  103.           max-width:    var(--max-width) !important;
  104.           padding-left: 200px !important;
  105.           margin:       40px auto 0 !important;
  106.       }
  107.       #mainContent { width: 100% !important; float: none !important; }
  108.       #mainContent .postBody { padding: 40px 20px !important; font-size: 17px !important; }
  109.       #mainContent .postBody p,
  110.       #mainContent .postBody li,
  111.       #mainContent .postBody span { font-size: 17px !important; }
  112.   }
  113.   /* 移动端 (≤767px) */
  114.   @media screen and (max-width: 767px) {
  115.       #main { width: 100% !important; padding: 0 !important; }
  116.       #mainContent .postBody { padding: 10px 15px !important; }
  117.       #mainContent .postBody,
  118.       #mainContent .postBody p,   #mainContent .postBody ol,
  119.       #mainContent .postBody ul,  #mainContent .postBody li,
  120.       #mainContent .postBody li p, #mainContent .postBody span {
  121.           font-size: 15px !important;
  122.       }
  123.       #mainContent .postBody ol,
  124.       #mainContent .postBody ul { padding-left: 1.2em !important; }
  125.   }
  126.   /* =====================================================
  127.      4. 代码块
  128.      · 深色背景 + 白色文字,覆盖 highlight.js 各 token 色
  129.      · 行内 code:浅灰背景 + 强调色,与块级代码视觉区分
  130.      ===================================================== */
  131.   /* 块级代码 */
  132.   #mainContent .postBody pre, #mainContent .postBody code,
  133.   .cnblogs-post-body pre, .cnblogs-markdown pre {
  134.       background-color: var(--code-bg) !important;
  135.       color:            #ffffff !important;
  136.       border:           none !important;
  137.       border-radius:    4px !important;
  138.       padding:          20px !important;
  139.       font-family:      var(--font-mono) !important;
  140.       font-size:        14px !important;
  141.       line-height:      1.6 !important;
  142.   }
  143.   /* 覆盖 highlight.js token 颜色,统一白色 */
  144.   #mainContent .postBody pre span, #mainContent .postBody code span,
  145.   .hljs, .hljs-keyword, .hljs-string, .hljs-comment,
  146.   .hljs-operator, .hljs-function, .hljs-title, .hljs-params {
  147.       color:            #ffffff !important;
  148.       background-color: transparent !important;
  149.       font-style:       normal !important;
  150.   }
  151.   /* 行内代码(不在 pre 内) */
  152.   #mainContent .postBody :not(pre) > code {
  153.       background-color: #f3f4f4 !important;
  154.       color:            var(--accent-color) !important;
  155.       padding:          2px 4px !important;
  156.       border-radius:    3px !important;
  157.       font-family:      inherit !important;
  158.   }
  159.   /* =====================================================
  160.      5. 隐藏冗余元素
  161.      · 侧边栏、广告、置顶图标、多余按钮等
  162.      · 如博客园新增推广组件,在此追加选择器即可
  163.      ===================================================== */
  164.   #topics .postTitle, .entrylistPosttitle, #cb_post_title_url,
  165.   #sideBar, #sideBarMain, #navList,
  166.   #green_channel, #vip_tip, #BlogPostCategory,
  167.   #commentform_title,
  168.   #under_post_card1, #under_post_card2,
  169.   #cnblogs_ch, #blog_c1,
  170.   #tip_comment2, .commentbox_title_right,
  171.   .p_arrow, .p_puton, .post_top_icon,
  172.   img[src*="zhiding"], span[style*="color: blue"], .pinned-post-mark {
  173.       display: none !important;
  174.   }
  175.   /* =====================================================
  176.      6. 页面头部 & 导航栏
  177.      ===================================================== */
  178.   /* 头部容器:上下留白,居中,去边框背景 */
  179.   #header {
  180.       margin:     80px auto 60px !important;
  181.       max-width:  var(--max-width) !important;
  182.       text-align: center !important;
  183.       padding:    0 20px !important;
  184.       border:     none !important;
  185.       background: transparent !important;
  186.   }
  187.   /* 博客主标题:大字重、紧字距 */
  188.   #blogTitle h1 {
  189.       font-family:    var(--font-serif) !important;
  190.       font-size:      42px !important;
  191.       font-weight:    800 !important;
  192.       letter-spacing: -1px !important;
  193.       margin-bottom:  10px !important;
  194.   }
  195.   #blogTitle h1 a { color: var(--text-title) !important; text-decoration: none !important; }
  196.   /* 博客副标题:正常字重,浅灰 */
  197.   #blogTitle h2 {
  198.       font-family: var(--font-serif) !important;
  199.       font-size:   18px !important;
  200.       font-weight: 400 !important;
  201.       color:       #999 !important;
  202.       margin-top:  5px !important;
  203.       line-height: 1.5 !important;
  204.   }
  205.   /* 导航栏:顶部细线与头部分隔 */
  206.   #navigator {
  207.       margin-top:  30px !important;
  208.       border-top:  1px solid #eee !important;
  209.       padding-top: 20px !important;
  210.   }
  211.   /* =====================================================
  212.      7. 首页文章列表
  213.      · 同天/异天随笔间距统一为 56px
  214.        原理:.day 本身零间距,节奏全部由 .postTitle margin
  215.        和 .day+.day 控制,两者数值相同,视觉节奏一致
  216.      · postDesc 与标题/摘要左侧严格对齐(padding: 0)
  217.      · 颜色固定为 #bbb,深浅色模式下视觉一致
  218.      ===================================================== */
  219.   /* .day 本身不贡献间距 */
  220.   .day { margin: 0 !important; padding: 0 !important; border: none !important; }
  221.   /* 不同天的 .day 之间:56px(与同天内帖间距相同) */
  222.   .day + .day { margin-top: 56px !important; }
  223.   /* 隐藏原有分割线,间距已由 .postTitle margin 接管 */
  224.   .postSeparator { display: none !important; }
  225.   /* 每篇标题块:56px 顶距 + 细灰分割线(同天第 2 篇起生效) */
  226.   .postTitle {
  227.       margin-top:  56px !important;
  228.       padding-top: 20px !important;
  229.       border-top:  1px solid #f0f0f0 !important;
  230.   }
  231.   /* 每个 .day 内第一篇:去顶距和分割线(由 .day+.day 接管) */
  232.   .day > .postTitle:first-child,
  233.   .day > a:first-child + .postTitle,
  234.   .day > .postTitle:first-of-type {
  235.       margin-top: 0 !important;
  236.       border-top: none !important;
  237.   }
  238.   /* 移除标题左侧蓝色竖线 */
  239.   .day .postTitle2, .postTitle2, .entrylistPosttitle,
  240.   #mainContent .day .postTitle {
  241.       border-left:  none !important;
  242.       padding-left: 0 !important;
  243.       margin-left:  0 !important;
  244.   }
  245.   /* 文章标题链接 */
  246.   .postTitle2 {
  247.       font-family:     var(--font-serif) !important;
  248.       font-size:       26px !important;
  249.       font-weight:     700 !important;
  250.       line-height:     1.3 !important;
  251.       color:           var(--text-title) !important;
  252.       text-decoration: none !important;
  253.   }
  254.   /* 移除标题伪元素装饰(部分皮肤会添加) */
  255.   .postTitle2::before, .postTitle2::after,
  256.   .entrylistPosttitle::before {
  257.       content: none !important;
  258.       display: none !important;
  259.       border:  none !important;
  260.       width:   0 !important;
  261.   }
  262.   /* 摘要:稍小字号 + 浅灰,与标题形成层级对比 */
  263.   .postCon, .c_b_p_desc {
  264.       font-family:   var(--font-serif) !important;
  265.       font-size:     15px !important;
  266.       line-height:   1.75 !important;
  267.       color:         #888 !important;
  268.       margin-top:    10px !important;
  269.       margin-bottom: 0 !important;
  270.   }
  271.   /* "阅读全文"链接 */
  272.   .c_b_p_desc_readmore {
  273.       display:         inline-block !important;
  274.       margin-top:      8px !important;
  275.       font-size:       13px !important;
  276.       color:           var(--text-title) !important;
  277.       font-weight:     600 !important;
  278.       text-decoration: underline !important;
  279.   }
  280.   /* 文章元信息栏(时间、评论数等) */
  281.   .postDesc {
  282.       font-family:      var(--font-serif) !important;
  283.       font-size:        12px !important;
  284.       text-transform:   uppercase !important;
  285.       letter-spacing:   1.5px !important;
  286.       color:            #bbb !important;
  287.       margin-top:       10px !important;
  288.       margin-bottom:    0 !important;
  289.       padding:          0 !important;      /* 与标题/摘要左侧严格对齐 */
  290.       text-align:       left !important;
  291.       background-image: none !important;
  292.       border:           none !important;
  293.   }
  294.   /* postDesc 内链接(含"编辑"按钮):Pixyll hover 风格 */
  295.   .postDesc a {
  296.       color:           #bbb !important;
  297.       text-decoration: none !important;
  298.       border-bottom:   1px solid transparent !important;
  299.       transition:      color 0.25s ease, border-bottom-color 0.25s ease !important;
  300.   }
  301.   .postDesc a:hover,
  302.   .postDesc .post-edit-link:hover {
  303.       color:               #111 !important;
  304.       border-bottom-color: #111 !important;
  305.   }
  306.   /* 隐藏 postDesc 内图标字体(iconfont / Font Awesome 等) */
  307.   .postDesc i, .postDesc .iconfont, .postDesc [class*="fa-"],
  308.   .postDesc .far, .postDesc .fas,
  309.   .postDesc::before, .postDesc span::before {
  310.       display:   none !important;
  311.       font-size: 0 !important;
  312.       opacity:   0 !important;
  313.   }
  314.   /* 移除文章底部"上一篇/下一篇"边框 */
  315.   #post_next_prev, #blog_post_info_block {
  316.       border-top:    none !important;
  317.       border-bottom: none !important;
  318.   }
  319.   /* 分页按钮 */
  320.   .pager { font-family: var(--font-serif) !important; margin-top: 50px !important; color: #999 !important; }
  321.   .pager a { border: 1px solid #eee !important; padding: 8px 16px !important; border-radius: 4px !important; color: #333 !important; }
  322.   /* =====================================================
  323.      8. 评论区
  324.      ===================================================== */
  325.   /*
  326.    * Pixyll 通用链接 hover 风格
  327.    * 适用范围:评论导航 / 排序切换 / 评论投票 / 单条评论 Digg
  328.    * 规则:默认浅灰无下划线,hover 时文字变黑 + 底部细线浮现
  329.    */
  330.   #comment_nav a,
  331.   #comment_sort a, #comment_sort span,
  332.   .comment_vote a,
  333.   .comment_digg a, .comment_bury a {
  334.       color:           #bbb !important;
  335.       text-decoration: none !important;
  336.       border-bottom:   1px solid transparent !important;
  337.       font-family:     var(--font-serif) !important;
  338.       transition:      color 0.25s ease, border-bottom-color 0.25s ease !important;
  339.   }
  340.   #comment_nav a:hover,
  341.   #comment_sort a:hover,
  342.   .comment_vote a:hover,
  343.   .comment_digg a:hover, .comment_bury a:hover {
  344.       color:               #111 !important;
  345.       border-bottom-color: #111 !important;
  346.   }
  347.   /* 投票 / Digg 按钮字号略小 */
  348.   .comment_vote a,
  349.   .comment_digg a, .comment_bury a { font-size: 12px !important; }
  350.   /* 评论排序:当前选中项保持黑色 + 底线 */
  351.   #comment_sort .active,
  352.   #comment_sort span.selected {
  353.       color:               #111 !important;
  354.       border-bottom-color: #111 !important;
  355.   }
  356.   /* "评论列表"标题 */
  357.   .feedback_area_title { font-family: var(--font-serif) !important; }
  358.   /* 评论内容:与正文排版一致 */
  359.   .feedbackItem {
  360.       font-family:    var(--font-serif) !important;
  361.       font-size:      17px !important;
  362.       line-height:    1.8 !important;
  363.       letter-spacing: 0.01em !important;
  364.       color:          var(--text-main) !important;
  365.       text-indent:    0 !important;
  366.   }
  367.   /* 评论者姓名:加粗,黑色,去下划线 */
  368.   .feedbackItem .comment_author,
  369.   .feedbackItem .comment_author a,
  370.   .feedbackItem .louzhu {
  371.       color:           #000 !important;
  372.       font-weight:     600 !important;
  373.       text-decoration: none !important;
  374.   }
  375.   /* 评论时间与楼层:80% 透明度 */
  376.   .feedbackListSubtitle, .feedbackListSubtitle a,
  377.   .comment_actions a { color: #000 !important; opacity: 0.8; }
  378.   /* 评论输入框:细边框方角,hover/focus 时边框变黑 */
  379.   div.commentbox_main,
  380.   textarea#tbCommentBody,
  381.   .comment_textarea {
  382.       border:           1px solid #ddd !important;
  383.       background-color: #fff !important;
  384.       border-radius:    0 !important;
  385.       padding:          12px !important;
  386.       font-family:      var(--font-serif) !important; /* 输入文字同步衬线字体 */
  387.       box-sizing:       border-box !important;
  388.       transition:       border-color 0.3s ease-in-out !important;
  389.   }
  390.   div.commentbox_main:hover,
  391.   textarea#tbCommentBody:hover,
  392.   textarea#tbCommentBody:focus { border-color: #000 !important; outline: none !important; }
  393.   /* 移除输入框伪元素装饰 */
  394.   div.commentbox_main::before,
  395.   div.commentbox_main::after { display: none !important; }
  396.   /* 评论框 Tab("编辑" / "预览"):黑色文字,选中项有外框 */
  397.   .commentbox_title a,
  398.   .commentbox_title_left a,
  399.   .commentbox_title_left .tab_selected,
  400.   .commentbox_title_left span {
  401.       font-family:           var(--font-serif) !important;
  402.       color:                 #000 !important;
  403.       text-decoration-color: #000 !important;
  404.       border-bottom-color:   #000 !important;
  405.       font-weight:           500 !important;
  406.   }
  407.   .commentbox_title_left .tab_selected {
  408.       border:           1px solid #000 !important;
  409.       background-color: #fff !important;
  410.       border-bottom:    none !important; /* 选中时底边融入内容区 */
  411.   }
  412.   .commentbox_title a:hover {
  413.       color:                 #666 !important;
  414.       text-decoration-color: #666 !important;
  415.       border-bottom-color:   #666 !important;
  416.   }
  417.   .commentbox_title_left { border-bottom: 1px solid #000 !important; }
  418.   /* 评论框底部选项("退出"、表情等) */
  419.   #commentbox_opt,
  420.   #commentbox_opt a {
  421.       font-family: var(--font-serif) !important;
  422.       color:       #000 !important;
  423.       font-size:   13px !important;
  424.   }
  425.   #commentbox_opt a { text-decoration: none !important; transition: color 0.3s ease !important; }
  426.   #commentbox_opt a:hover { color: #bbb !important; }
  427.   /* "自动补全"提示 */
  428.   .inline_middle { font-family: var(--font-serif) !important; }
  429.   /* 提交评论按钮:实心黑底,hover 稍淡 + 阴影 */
  430.   #btn_comment_submit {
  431.       background-color: #000 !important;
  432.       color:            #fff !important;
  433.       border:           1px solid #000 !important;
  434.       padding:          8px 24px !important;
  435.       border-radius:    4px !important;
  436.       font-family:      var(--font-serif) !important;
  437.       font-size:        14px !important;
  438.       cursor:           pointer !important;
  439.       transition:       all 0.3s ease !important;
  440.   }
  441.   #btn_comment_submit:hover {
  442.       background-color: #333 !important;
  443.       border-color:     #333 !important;
  444.       box-shadow:       0 2px 8px rgba(0,0,0,.2) !important;
  445.   }
  446.   /*
  447.    * 博客统计区域(#blogStats)字体:
  448.    * 博客园用内联 style 写死字体,CSS !important 无法覆盖内联样式,
  449.    * 暂无有效方案,留此注释供日后排查
  450.    */
  451.   /* =====================================================
  452.      9. 随笔 Digg(推荐 / 反对)
  453.      · 极简 flex 布局,数字大字,无背景无边框
  454.      · 用 ::after 伪元素生成文字标签,避免修改 HTML
  455.      ===================================================== */
  456.   #div_digg { margin: 60px 0 !important; display: flex !important; }
  457.   .diggit, .buryit {
  458.       flex:       1 !important;
  459.       text-align: center !important;
  460.       background: none !important;
  461.       border:     none !important;
  462.       box-shadow: none !important;
  463.       padding:    20px 0 !important;
  464.   }
  465.   .diggnum, .burynum {
  466.       font-size:     22px !important;
  467.       font-weight:   600 !important;
  468.       color:         #111 !important;
  469.       display:       block !important;
  470.       margin-bottom: 6px !important;
  471.   }
  472.   .diggit::after  { content: "推荐"; display: block; font-size: 13px; color: #666; white-space: nowrap; }
  473.   .buryit::after   { content: "反对"; display: block; font-size: 13px; color: #666; white-space: nowrap; }
  474.   .diggit:hover::after, .buryit:hover::after { color: #000; }
复制代码
页脚HTML代码
  1.   
复制代码
特点

✨ 很简洁,隐藏了很多元素,详细内容待各位阅读代码


来源:程序园用户自行投稿发布,如果侵权,请联系站长删除
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!

相关推荐

您需要登录后才可以回帖 登录 | 立即注册