extra.css 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. abbr[title] {
  2. border-bottom: 1px dotted;
  3. cursor: help;
  4. position: relative;
  5. }
  6. abbr[title]::after {
  7. content: attr(title);
  8. position: absolute;
  9. left: 0;
  10. bottom: 125%;
  11. background-color: #ffffff; /* 白色背景 */
  12. color: #1B85E3; /* 腾讯蓝字体 */
  13. padding: 3px 6px; /* 调整内边距,使弹窗小巧 */
  14. border-radius: 4px;
  15. white-space: nowrap;
  16. font-size: 12px; /* 字体变小 */
  17. line-height: 1.2; /* 行高紧凑 */
  18. opacity: 0;
  19. pointer-events: none;
  20. transition: opacity 0.2s;
  21. z-index: 100;
  22. box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  23. }
  24. abbr[title]:hover::after {
  25. opacity: 1;
  26. }
  27. /* =========================
  28. 全局主题颜色修改为 #0183fa
  29. ========================= */
  30. /* 导航栏菜单文字 */
  31. .md-header-nav__link,
  32. .md-header-nav__link:hover,
  33. .md-header-nav__link--active {
  34. color: #0183fa !important;
  35. }
  36. /* 所有章节标题 H1-H6 */
  37. .md-content h1,
  38. .md-content h2,
  39. .md-content h3,
  40. .md-content h4,
  41. .md-content h5,
  42. .md-content h6 {
  43. color: #0183fa !important;
  44. }
  45. /* 底部 footer */
  46. .custom-footer {
  47. color: #0183fa !important;
  48. }
  49. /* 如果 footer 内有链接,也改颜色 */
  50. .custom-footer a {
  51. color: #0183fa !important;
  52. text-decoration: none;
  53. }
  54. .custom-footer a:hover {
  55. text-decoration: underline;
  56. }
  57. /* =========================
  58. 右侧目录选中条目颜色
  59. ========================= */
  60. .md-nav--secondary .md-nav__link--active {
  61. color: #0183fa !important; /* 文字颜色 */
  62. font-weight: 600; /* 加粗显示,可选 */
  63. }
  64. /* 鼠标悬停右侧目录条目颜色 */
  65. .md-nav--secondary .md-nav__link:hover {
  66. color: #0183fa !important;
  67. }
  68. /* =====================================
  69. 顶部 Tabs:选中项文字变蓝(无下划线)
  70. ===================================== */
  71. /* 当前激活的 Tab 文本 */
  72. .md-tabs__item--active > .md-tabs__link {
  73. color: #0183FA !important;
  74. font-weight: 600;
  75. }
  76. /* Hover 状态也统一为蓝色 */
  77. .md-tabs__link:hover {
  78. color: #0183FA;
  79. }
  80. /* ❌ 移除默认的底部横线 */
  81. .md-tabs__item--active .md-tabs__link::after {
  82. display: none !important;
  83. }
  84. /* 有些版本是 border-bottom 方式,也一并清掉 */
  85. .md-tabs__item--active .md-tabs__link {
  86. border-bottom: none !important;
  87. }
  88. /* =====================================
  89. 左侧导航(Sidebar)选中 & Hover 蓝色化
  90. ===================================== */
  91. /* 1️⃣ 当前页面(选中态,最关键) */
  92. .md-nav__link--active {
  93. color: #0183FA !important;
  94. font-weight: 600;
  95. }
  96. /* 2️⃣ 当前展开的父级节点 */
  97. .md-nav__item--active > .md-nav__link {
  98. color: #0183FA !important;
  99. }
  100. /* 3️⃣ 鼠标 Hover(覆盖默认的 accent 紫色) */
  101. .md-nav__link:hover {
  102. color: #0183FA !important;
  103. }
  104. /* 4️⃣ 左侧折叠/展开箭头 */
  105. .md-nav__item--active > .md-nav__link .md-nav__icon,
  106. .md-nav__link:hover .md-nav__icon {
  107. color: #0183FA;
  108. }
  109. /* 5️⃣ 防止 Material 用 accent 色反向覆盖 */
  110. .md-nav__link:focus {
  111. color: #0183FA !important;
  112. }
  113. :root { --system-primary: #0183FA; }
  114. /* “更多”作为 tab 项在最右侧 */
  115. .md-tabs__item--more{
  116. margin-left: auto;
  117. position: relative;
  118. display: flex;
  119. align-items: stretch; /* 让内部能撑满 tab 行高度 */
  120. }
  121. /* 关键:按钮撑满 tab 行高度 + flex 垂直居中 + 去基线影响 */
  122. .md-tabs__more-link{
  123. height: 100% !important;
  124. display: inline-flex !important;
  125. align-items: center !important;
  126. justify-content: center !important;
  127. padding: 0 12px !important;
  128. line-height: 0 !important; /* ✅ 防止贴底 */
  129. border: 0 !important;
  130. background: transparent !important;
  131. cursor: pointer !important;
  132. pointer-events: auto !important; /* ✅ 确保可点 */
  133. }
  134. /* 三角本体 */
  135. .md-tabs__more-triangle{
  136. display: block;
  137. width: 0;
  138. height: 0;
  139. border-left: 8px solid transparent;
  140. border-right: 8px solid transparent;
  141. border-top: 10px solid var(--system-primary);
  142. }
  143. /* 下拉面板(JS 用 style.display 控制显示) */
  144. .md-tabs__item--more .md-tabs__more-panel{
  145. position: absolute;
  146. right: 0;
  147. top: 100%;
  148. margin-top: 6px;
  149. min-width: 240px;
  150. max-width: 420px;
  151. max-height: 60vh;
  152. overflow: auto;
  153. padding: 6px;
  154. display: none;
  155. z-index: 9999;
  156. background: #fff;
  157. border: 1px solid rgba(0,0,0,.12);
  158. border-radius: 10px;
  159. box-shadow: 0 10px 30px rgba(0,0,0,.18);
  160. }
  161. [data-md-color-scheme="slate"] .md-tabs__item--more .md-tabs__more-panel{
  162. background:#1e1e1e;
  163. border-color: rgba(255,255,255,.12);
  164. }
  165. /* 面板条目 */
  166. .md-tabs__more-item{
  167. display:block;
  168. padding: 8px 10px;
  169. border-radius: 8px;
  170. text-decoration:none;
  171. color: inherit;
  172. white-space: nowrap;
  173. }
  174. .md-tabs__more-item:hover{
  175. color: var(--system-primary);
  176. background: rgba(1,131,250,0.08);
  177. }
  178. .md-tabs__more-item.is-active{
  179. color: var(--system-primary);
  180. font-weight: 600;
  181. background: rgba(1,131,250,0.10);
  182. }
  183. :root { --system-primary: #0183FA; }
  184. /* 让整个 Tabs 行按 flex 布局,垂直居中所有 tab */
  185. .md-tabs__list{
  186. display: flex !important;
  187. align-items: center !important; /* ✅ 关键:整体垂直居中 */
  188. }
  189. /* 每个 tab 项也用 flex,避免基线对齐把内容压到底 */
  190. .md-tabs__item{
  191. display: flex !important;
  192. align-items: center !important;
  193. }
  194. /* “更多”tab 放最右侧 */
  195. .md-tabs__item--more{
  196. margin-left: auto !important;
  197. }
  198. /* 更多按钮:去掉基线影响,保证居中 */
  199. .md-tabs__more-link{
  200. display: inline-flex !important;
  201. align-items: center !important;
  202. justify-content: center !important;
  203. padding: 0 12px !important;
  204. line-height: 1 !important; /* ✅ 不要用 0,0 在某些字体下会贴底 */
  205. border: 0 !important;
  206. background: transparent !important;
  207. cursor: pointer !important;
  208. }
  209. /* 实心蓝色倒三角 */
  210. .md-tabs__more-triangle{
  211. display: block;
  212. width: 0;
  213. height: 0;
  214. border-left: 8px solid transparent;
  215. border-right: 8px solid transparent;
  216. border-top: 10px solid var(--system-primary);
  217. }
  218. /* 防止第 10 个 tab 露出一截:Tabs 行裁剪 */
  219. .md-tabs__list{
  220. overflow: hidden !important;
  221. }