/* chapter-generator.page.scss */ ion-menu { --width: 80%; } ion-list { margin-top: 16px; } .overlay { position: fixed; top: 0; left: 0; width: calc(100% - 200px); /* 200px 是侧边栏的宽度 */ height: 100%; background-color: rgba(0, 0, 0, 0.5); /* 半透明黑色背景 */ z-index: 999; /* 确保遮罩层在主要内容之上 */ margin-left: 200px; /* 与侧边栏对齐 */ } .content-container { display: flex; width: 100%; height: 100%; position: relative; z-index: 100; /* 设置一个比侧边栏低的 z-index */ } .chapter-edit-container { flex: 1; padding: 16px; position: relative; z-index: 100; /* 设置与 AI 功能按钮相同的 z-index */ } ion-fab { z-index: 1000; /* 确保悬浮球在最上层 */ }