可以使用以下样式来实现所需效果:

.anniu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.3);
}

这样设置后,.anniu class 元素将会以白色30%透明的背景色居中显示。

anniu	z-index 1000;让这个class居中显示背景白色30透明

原文地址: https://www.cveoy.top/t/topic/hMUj 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录