找回密码
 注册账号
搜索
查看: 73|回复: 0

[wordpress] 模板图的modown主题,修改插入代码的背景

[复制链接]

3271

主题

701

回帖

3万

积分

管理员

积分
34099

最佳新人活跃会员热心会员推广达人宣传达人灌水之王突出贡献优秀版主荣誉管理论坛元老

发表于 2025.12.1 14:34 | 显示全部楼层 |阅读模式
修改modown的插入代码功能,使其变正常


在wordpress后台,Modown主题设置,样式,最下面,自定义CSS,添加

  1. .article-content code{background:transparent}
复制代码




以及一个修改文章内网址超链接颜色的css,也是可以这里添加

  1. /* --- Modown 主题文章链接颜色修改开始(修正版:排除点赞/分享模块)--- */

  2. /* 1. 设置文章主体内容区域链接的颜色和样式 */
  3. /* 目标:文章内的超链接 */
  4. .article-content a,
  5. .entry-content a,
  6. .single-content a {
  7.     color: #1e73be !important; /* 链接颜色:蓝色 */
  8.     text-decoration: none; /* 移除下划线 */
  9. }

  10. /* 2. 鼠标悬停时的颜色(深蓝) */
  11. .article-content a:hover,
  12. .entry-content a:hover,
  13. .single-content a:hover {
  14.     color: #0056b3 !important;
  15.     text-decoration: underline;
  16. }

  17. /* 3. 排除按钮或特定元素(防止把下载按钮也变色) */
  18. .article-content .btn,
  19. .article-content .button {
  20.     color: #fff !important; /* 按钮文字颜色:白色 */
  21.     text-decoration: none;
  22. }

  23. /* 4. 【重点修正】重置“点赞、收藏、分享”等模块内链接的颜色和样式 */
  24. /* - 包含常见的文章元信息/交互模块类名(如 .post-meta, .entry-footer, .share-box 等)。
  25.    - 使用 'inherit' 属性将颜色恢复为主题为这些模块设定的默认颜色。
  26. */
  27. .article-content .post-meta a,
  28. .article-content .entry-footer a,
  29. .article-content .post-actions a,
  30. .article-content .post-love a,
  31. .article-content .share-box a
  32. {
  33.     color: inherit !important; /* 恢复为父级元素的默认颜色 */
  34.     text-decoration: none !important;
  35. }

  36. /* 5. 【重点修正】重置上述模块内链接的鼠标悬停颜色 */
  37. .article-content .post-meta a:hover,
  38. .article-content .entry-footer a:hover,
  39. .article-content .post-actions a:hover,
  40. .article-content .post-love a:hover,
  41. .article-content .share-box a:hover
  42. {
  43.     color: inherit !important; /* 恢复为父级元素的默认悬停颜色 */
  44.     /* 如果原主题的悬停有下划线,可以改为 text-decoration: underline !important; */
  45.     text-decoration: none !important;
  46. }

  47. /* --- Modown 主题文章链接颜色修改结束 --- */
复制代码


您需要登录后才可以回帖 登录 | 注册账号

本版积分规则

Archiver|手机版|小黑屋|童话镇 |网站地图

GMT+8, 2025.12.8 03:08 , Processed in 0.037920 second(s), 4 queries , Gzip On, MemCached On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表