/* 移动端基础样式重置 */ * { margin: 0; padding: 0; box-sizing: border-box; } html { font-size: 16px; /* 基础字体大小 */ } html, body { width: 100%; height: 100%; overflow-x: hidden; } body { margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; font-size: 16px; /* 提高基础字体大小 */ line-height: 1.5; color: #262626; background-color: #f5f5f5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-size-adjust: 100%; /* 防止 iOS 自动调整字体大小 */ overflow-y: auto; } #root { width: 100%; height: 100%; } /* 链接样式 */ a { color: #1677ff; text-decoration: none; } a:active { color: #0958d9; } /* 按钮重置 */ button { border: none; background: none; padding: 0; font: inherit; cursor: pointer; outline: none; } input, textarea, select { font: inherit; outline: none; } /* 安全区域适配 */ @supports (bottom: env(safe-area-inset-bottom)) { body { padding-bottom: env(safe-area-inset-bottom); } } /* Dialog 组件层级修复 - 确保在所有固定定位元素之上 */ /* Dialog 容器 - 最高优先级 */ .adm-dialog { position: fixed !important; top: 0 !important; left: 0 !important; width: 100% !important; height: 100% !important; z-index: 99999 !important; display: flex !important; align-items: center !important; justify-content: center !important; } /* Dialog 遮罩 - 确保在容器内但有正确的层级 */ .adm-dialog .adm-dialog-mask { position: absolute !important; top: 0 !important; left: 0 !important; width: 100% !important; height: 100% !important; z-index: 1 !important; background-color: rgba(0, 0, 0, 0.45) !important; } /* Dialog 内容容器 - 在遮罩之上 */ .adm-dialog .adm-dialog-content { position: relative !important; z-index: 2 !important; } /* Dialog 内部元素 - 确保在内容容器之上 */ .adm-dialog .adm-dialog-body, .adm-dialog .adm-dialog-header, .adm-dialog .adm-dialog-footer, .adm-dialog .adm-button { position: relative !important; z-index: 3 !important; } /* 处理 antd-mobile 5.x 的实际 DOM 结构 */ /* antd-mobile 5.x 的 Dialog 可能直接渲染到 body 下 */ body > .adm-dialog { z-index: 99999 !important; } /* 确保 mask 不会覆盖 dialog 内容 */ .adm-dialog-mask ~ .adm-dialog-content { position: relative !important; z-index: 10 !important; }