z-index 对 table 元素无效,因其默认 position: static;需为菜单容器设 position: absolute/fixed 并配 z-index,同时避免父级创建新层叠上下文(如 transform、opacity

z-index 对 table 元素本身无效
直接给 常见错误现象:菜单弹出后被表格行遮挡,即使设置了 或
、 设置 z-index 不会生效,因为这些元素默认是 position: static,而 z-index 只对定位元素(position 为 relative、absolute、fixed 或 sticky)起作用。z-index: 9999 也没用。
前端入门到VUE实战笔记:立即使用
在学习笔记中,你将探索 前端 的入门与实战技巧!











