跳转到内容
主菜单
主菜单
移至侧栏
隐藏
导航
首页
分类索引
最近更改
随便看看
灵兰秘典
捐助本站
帮助
帮助
联系我们
关于本站
MediaWiki帮助
USER-SIDEBAR
GROUP-SIDEBAR
CATEGORY-SIDEBAR
中医百科
搜索
搜索
外观
登录
个人工具
登录
查看“︁MediaWiki:Gadget-ReferenceTooltips.css”︁的源代码
系统消息
讨论
English
阅读
查看源代码
查看历史
工具
工具
移至侧栏
隐藏
操作
阅读
查看源代码
查看历史
常规
链入页面
相关更改
特殊页面
页面信息
外观
移至侧栏
隐藏
←
MediaWiki:Gadget-ReferenceTooltips.css
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
此页面为本wiki上的软件提供界面文本,并受到保护以防止滥用。 如欲修改所有wiki的翻译,请访问
translatewiki.net
上的MediaWiki本地化项目。
您无权编辑此CSS页面,因为编辑此页面可能会影响所有访问者。
您可以查看和复制此页面的源代码。
/* ==================================================================== * Reference Tooltips 参考提示工具 - 核心样式 v2.1 * 功能说明: * 1. 支持明/暗模式自动切换 * 2. 完美适配Codex设计系统 * 3. 响应式布局优化 * 4. 高清屏显示优化 * 集成方式:复制整个代码块到MediaWiki:Gadget-ReferenceTooltips.css * ==================================================================== */ /* 基础覆盖层样式 */ .rt-overlay { position: absolute; width: 100%; font-size: calc(var(--font-size-medium, 1rem) * 0.928); /* 13px/14px */ line-height: 1.5em; z-index: 800; /* 匹配Codex的z-index层级 */ top: 0; pointer-events: none; /* 防止阻挡下方交互 */ } /* 旧版皮肤兼容(可安全删除如果不再支持) */ .skin-vector-legacy .rt-overlay { font-size: 13px; } .skin-monobook .rt-overlay { font-size: 12.7px; } /* 主工具提示容器 */ .rt-tooltip { position: absolute; max-width: min(27em, 90vw); /* 响应式限制 */ background: var(--background-color-base, #fff); color: var(--color-base, #202122); border: 1px solid var(--border-color-subtle, #c8ccd1); border-radius: var(--border-radius-small, 2px); box-shadow: var(--box-shadow-dialog-medium); transition: opacity 0.15s ease; pointer-events: auto; /* 恢复内部交互 */ } /* 暗模式适配 */ html.skin-theme-clientpref-night .rt-tooltip { --background-color-base: var(--color-surface-1, #1e1e1e); --color-base: var(--color-base, #eee); --border-color-subtle: var(--border-color-subtle, #54595d); box-shadow: 0 20px 48px rgba(0, 0, 0, 0.8); } /* 悬停区域扩展(防抖) */ .rt-tooltip-above .rt-hoverArea { margin-bottom: -0.6em; padding-bottom: 0.6em; } .rt-tooltip-below .rt-hoverArea { margin-top: -0.7em; padding-top: 0.7em; } /* 内容区域 */ .rt-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; /* iOS平滑滚动 */ } .rt-content { padding: 0.7em 0.9em; overflow-wrap: break-word; font-family: var(--font-family-base); /* 继承Wiki字体 */ } /* 工具提示小三角(适配高清屏) */ .rt-tail { --tail-size: 13px; position: absolute; width: var(--tail-size); height: var(--tail-size); z-index: -1; background: linear-gradient( to top right, var(--border-color-subtle, #c8ccd1) 48%, transparent 48% ); } .rt-tail:after { content: ''; position: absolute; width: calc(100% - 2px); height: calc(100% - 2px); background: inherit; bottom: 1px; left: 1px; } /* 定位调整 */ .rt-tooltip-above .rt-tail { transform: rotate(-45deg); bottom: 0; left: 19px; } .rt-tooltip-below .rt-tail { transform: rotate(135deg); top: 0; left: calc(19px + var(--tail-size)); } /* 设置按钮(Codex风格) */ .rt-settingsLink { --icon-size: 24px; float: right; margin: -0.5em -0.5em 0 0.5em; width: 32px; height: 32px; border: 1px solid transparent; border-radius: var(--border-radius-small); background: var(--icon-settings) center / var(--icon-size) no-repeat; opacity: 0.65; transition: all 0.2s ease; cursor: pointer; } /* SVG图标内联(明暗模式) */ :root { --icon-settings: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%2354595d' d='M20 14.5v-2.9l-1.8-.3c-.1-.4-.3-.8-.6-1.4l1.1-1.5-2.1-2.1-1.5 1.1c-.5-.3-1-.5-1.4-.6L13.5 5h-2.9l-.3 1.8c-.5.1-.9.3-1.4.6L7.4 6.3 5.3 8.4l1 1.5c-.3.5-.4.9-.6 1.4l-1.7.2v2.9l1.8.3c.1.5.3.9.6 1.4l-1 1.5 2.1 2.1 1.5-1c.4.2.9.4 1.4.6l.3 1.8h3l.3-1.8c.5-.1.9-.3 1.4-.6l1.5 1.1 2.1-2.1-1.1-1.5c.3-.5.5-1 .6-1.4l1.5-.3zM12 16c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3z'/%3E%3C/svg%3E"); } html.skin-theme-clientpref-night { --icon-settings: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23c8ccd1' d='M20 14.5v-2.9l-1.8-.3c-.1-.4-.3-.8-.6-1.4l1.1-1.5-2.1-2.1-1.5 1.1c-.5-.3-1-.5-1.4-.6L13.5 5h-2.9l-.3 1.8c-.5.1-.9.3-1.4.6L7.4 6.3 5.3 8.4l1 1.5c-.3.5-.4.9-.6 1.4l-1.7.2v2.9l1.8.3c.1.5.3.9.6 1.4l-1 1.5 2.1 2.1 1.5-1c.4.2.9.4 1.4.6l.3 1 conformalH8h3l.3-1.8c.5-.1.9-.3 1.4-.6l1.5 1.1 2.1-2.1-1.1-1.5c.3-.5.5-1 .6-1.4l1.5-.3zM12 16c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3z'/%3E%3C/svg%3E"); } /* 交互状态 */ .rt-settingsLink:hover { opacity: 1; background-color: var(--background-color-interactive, #f8f9fa); } .rt-settingsLink:active { border-color: var(--border-color-interactive, #72777d); } .rt-settingsLink:focus-visible { outline: 2px solid var(--border-color-progressive--focus, #36c); } /* 目标高亮样式 */ .rt-target { background-color: var(--background-color-progressive-subtle, #eaf3ff); animation: rt-highlight 1.5s ease-in-out; } /* 动画效果 */ @keyframes rt-fade-in-up { 0% { opacity: 0; transform: translateY(10px); } 100% { opacity: 1; transform: translateY(0); } } @keyframes rt-highlight { 0%, 100% { background-color: transparent; } 50% { background-color: var(--background-color-progressive-subtle); } } .rt-fade-in-up { animation: rt-fade-in-up 0.2s ease forwards; } /* 移动端优化 */ @media (max-width: 768px) { .rt-tooltip { max-width: 85vw; font-size: calc(var(--font-size-medium, 1rem) * 0.857); /* 12px/14px */ } .rt-content { padding: 0.6em 0.8em; } }
返回
MediaWiki:Gadget-ReferenceTooltips.css
。